forked from pocoproject/poco
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathSQLiteTest.h
More file actions
168 lines (133 loc) · 3.49 KB
/
Copy pathSQLiteTest.h
File metadata and controls
168 lines (133 loc) · 3.49 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
//
// SQLiteTest.h
//
// $Id: //poco/Main/Data/SQLite/testsuite/src/SQLiteTest.h#4 $
//
// Definition of the SQLiteTest class.
//
// Copyright (c) 2006, Applied Informatics Software Engineering GmbH.
// and Contributors.
//
// SPDX-License-Identifier: BSL-1.0
//
#ifndef SQLiteTest_INCLUDED
#define SQLiteTest_INCLUDED
#include "Poco/Data/SQLite/SQLite.h"
#include "CppUnit/TestCase.h"
namespace Poco {
namespace Data {
class Session;
} }
class SQLiteTest: public CppUnit::TestCase
{
public:
SQLiteTest(const std::string& name);
~SQLiteTest();
void testBinding();
void testZeroRows();
void testSimpleAccess();
void testInMemory();
void testNullCharPointer();
void testInsertCharPointer();
void testInsertCharPointer2();
void testComplexType();
void testSimpleAccessVector();
void testComplexTypeVector();
void testSharedPtrComplexTypeVector();
void testInsertVector();
void testInsertEmptyVector();
void testAffectedRows();
void testInsertSingleBulk();
void testInsertSingleBulkVec();
void testLimit();
void testLimitOnce();
void testLimitPrepare();
void testLimitZero();
void testPrepare();
void testSetSimple();
void testSetComplex();
void testSetComplexUnique();
void testMultiSetSimple();
void testMultiSetComplex();
void testMapComplex();
void testMapComplexUnique();
void testMultiMapComplex();
void testSelectIntoSingle();
void testSelectIntoSingleStep();
void testSelectIntoSingleFail();
void testLowerLimitOk();
void testLowerLimitFail();
void testCombinedLimits();
void testCombinedIllegalLimits();
void testRange();
void testIllegalRange();
void testSingleSelect();
void testEmptyDB();
void testCLOB();
void testTuple1();
void testTupleVector1();
void testTuple2();
void testTupleVector2();
void testTuple3();
void testTupleVector3();
void testTuple4();
void testTupleVector4();
void testTuple5();
void testTupleVector5();
void testTuple6();
void testTupleVector6();
void testTuple7();
void testTupleVector7();
void testTuple8();
void testTupleVector8();
void testTuple9();
void testTupleVector9();
void testTuple10();
void testTupleVector10();
void testDateTime();
void testInternalExtraction();
void testPrimaryKeyConstraint();
void testNullable();
void testNulls();
void testRowIterator();
void testAsync();
void testAny();
void testDynamicAny();
void testPair();
void testSQLChannel();
void testSQLLogger();
void testExternalBindingAndExtraction();
void testBindingCount();
void testMultipleResults();
void testReconnect();
void testThreadModes();
void testUpdateCallback();
void testCommitCallback();
void testRollbackCallback();
void testNotifier();
void testSessionTransaction();
void testTransaction();
void testTransactor();
void testFTS3();
void testJSONRowFormatter();
void setUp();
void tearDown();
static void sqliteUpdateCallbackFn(void*, int, const char*, const char*, Poco::Int64);
static int sqliteCommitCallbackFn(void*);
static void sqliteRollbackCallbackFn(void*);
void onInsert(const void* pSender);
void onUpdate(const void* pSender);
void onDelete(const void* pSender);
void onCommit(const void* pSender);
void onRollback(const void* pSender);
static CppUnit::Test* suite();
private:
void setTransactionIsolation(Poco::Data::Session& session, Poco::UInt32 ti);
void checkJSON(const std::string& sql, const std::string& json, int mode = 0);
static int _insertCounter;
static int _updateCounter;
static int _deleteCounter;
int _commitCounter;
int _rollbackCounter;
};
#endif // SQLiteTest_INCLUDED