@rocicorp/zero-sqlite3 1.0.9 → 1.0.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -0
- package/binding.gyp +1 -1
- package/deps/download.sh +4 -4
- package/deps/sqlite3.gyp +1 -1
- package/deps/test_extension.c +1 -1
- package/lib/database.js +1 -1
- package/lib/methods/transaction.js +3 -0
- package/package.json +9 -8
- package/src/addon.cpp +47 -0
- package/src/better_sqlite3.cpp +44 -2166
- package/src/objects/backup.cpp +120 -0
- package/src/objects/backup.hpp +36 -0
- package/src/objects/database.cpp +392 -0
- package/src/objects/database.hpp +102 -0
- package/src/objects/statement-iterator.cpp +113 -0
- package/src/objects/statement-iterator.hpp +50 -0
- package/src/objects/statement.cpp +446 -0
- package/src/objects/statement.hpp +59 -0
- package/src/util/bind-map.cpp +73 -0
- package/src/util/binder.cpp +193 -0
- package/src/util/constants.cpp +172 -0
- package/src/util/custom-aggregate.cpp +121 -0
- package/src/util/custom-function.cpp +59 -0
- package/src/util/custom-table.cpp +409 -0
- package/src/util/data-converter.cpp +17 -0
- package/src/util/data.cpp +194 -0
- package/src/util/helpers.cpp +109 -0
- package/src/util/macros.cpp +63 -0
- package/src/util/query-macros.cpp +71 -0
- package/src/util/row-builder.cpp +49 -0
- package/src/better_sqlite3.hpp +0 -1036
package/src/better_sqlite3.hpp
DELETED
|
@@ -1,1036 +0,0 @@
|
|
|
1
|
-
// better_sqlite3.hpp
|
|
2
|
-
//
|
|
3
|
-
|
|
4
|
-
#ifndef LZZ_BETTER_SQLITE3_better_sqlite3_hpp
|
|
5
|
-
#define LZZ_BETTER_SQLITE3_better_sqlite3_hpp
|
|
6
|
-
#line 2 "./src/better_sqlite3.lzz"
|
|
7
|
-
#include <climits>
|
|
8
|
-
#include <cstdio>
|
|
9
|
-
#include <cstring>
|
|
10
|
-
#include <string>
|
|
11
|
-
#include <vector>
|
|
12
|
-
#include <set>
|
|
13
|
-
#include <unordered_map>
|
|
14
|
-
#include <algorithm>
|
|
15
|
-
#include <sqlite3.h>
|
|
16
|
-
#include <node.h>
|
|
17
|
-
#include <node_object_wrap.h>
|
|
18
|
-
#include <node_buffer.h>
|
|
19
|
-
#line 145 "./src/util/macros.lzz"
|
|
20
|
-
void SetPrototypeGetter(
|
|
21
|
-
v8::Isolate* isolate,
|
|
22
|
-
v8::Local<v8::External> data,
|
|
23
|
-
v8::Local<v8::FunctionTemplate> recv,
|
|
24
|
-
const char* name,
|
|
25
|
-
v8::AccessorNameGetterCallback func
|
|
26
|
-
);
|
|
27
|
-
#line 36 "./src/util/binder.lzz"
|
|
28
|
-
static bool IsPlainObject(v8::Isolate* isolate, v8::Local<v8::Object> obj);
|
|
29
|
-
#define LZZ_INLINE inline
|
|
30
|
-
#line 20 "./src/util/macros.lzz"
|
|
31
|
-
v8::Local <v8::String> StringFromUtf8 (v8::Isolate * isolate, char const * data, int length);
|
|
32
|
-
#line 23 "./src/util/macros.lzz"
|
|
33
|
-
v8::Local <v8::String> InternalizedFromUtf8 (v8::Isolate * isolate, char const * data, int length);
|
|
34
|
-
#line 26 "./src/util/macros.lzz"
|
|
35
|
-
v8::Local <v8::Value> InternalizedFromUtf8OrNull (v8::Isolate * isolate, char const * data, int length);
|
|
36
|
-
#line 30 "./src/util/macros.lzz"
|
|
37
|
-
v8::Local <v8::String> InternalizedFromLatin1 (v8::Isolate * isolate, char const * str);
|
|
38
|
-
#line 34 "./src/util/macros.lzz"
|
|
39
|
-
void SetFrozen (v8::Isolate * isolate, v8::Local <v8::Context> ctx, v8::Local <v8::Object> obj, v8::Global <v8::String> & key, v8::Local <v8::Value> value);
|
|
40
|
-
#line 38 "./src/util/macros.lzz"
|
|
41
|
-
void ThrowError (char const * message);
|
|
42
|
-
#line 39 "./src/util/macros.lzz"
|
|
43
|
-
void ThrowTypeError (char const * message);
|
|
44
|
-
#line 40 "./src/util/macros.lzz"
|
|
45
|
-
void ThrowRangeError (char const * message);
|
|
46
|
-
#line 92 "./src/util/macros.lzz"
|
|
47
|
-
bool IS_SKIPPED (char c);
|
|
48
|
-
#line 97 "./src/util/macros.lzz"
|
|
49
|
-
template <typename T>
|
|
50
|
-
#line 97 "./src/util/macros.lzz"
|
|
51
|
-
T * ALLOC_ARRAY (size_t count);
|
|
52
|
-
#line 102 "./src/util/macros.lzz"
|
|
53
|
-
template <typename T>
|
|
54
|
-
#line 102 "./src/util/macros.lzz"
|
|
55
|
-
void FREE_ARRAY (T * array_pointer);
|
|
56
|
-
#line 106 "./src/util/macros.lzz"
|
|
57
|
-
v8::Local <v8::FunctionTemplate> NewConstructorTemplate (v8::Isolate * isolate, v8::Local <v8::External> data, v8::FunctionCallback func, char const * name);
|
|
58
|
-
#line 117 "./src/util/macros.lzz"
|
|
59
|
-
void SetPrototypeMethod (v8::Isolate * isolate, v8::Local <v8::External> data, v8::Local <v8::FunctionTemplate> recv, char const * name, v8::FunctionCallback func);
|
|
60
|
-
#line 130 "./src/util/macros.lzz"
|
|
61
|
-
void SetPrototypeSymbolMethod (v8::Isolate * isolate, v8::Local <v8::External> data, v8::Local <v8::FunctionTemplate> recv, v8::Local <v8::Symbol> symbol, v8::FunctionCallback func);
|
|
62
|
-
#line 1 "./src/util/constants.lzz"
|
|
63
|
-
class CS
|
|
64
|
-
{
|
|
65
|
-
#line 2 "./src/util/constants.lzz"
|
|
66
|
-
public:
|
|
67
|
-
#line 4 "./src/util/constants.lzz"
|
|
68
|
-
v8::Local <v8::String> Code (v8::Isolate * isolate, int code);
|
|
69
|
-
#line 10 "./src/util/constants.lzz"
|
|
70
|
-
explicit CS (v8::Isolate * isolate);
|
|
71
|
-
#line 119 "./src/util/constants.lzz"
|
|
72
|
-
v8::Global <v8::String> database;
|
|
73
|
-
#line 120 "./src/util/constants.lzz"
|
|
74
|
-
v8::Global <v8::String> reader;
|
|
75
|
-
#line 121 "./src/util/constants.lzz"
|
|
76
|
-
v8::Global <v8::String> source;
|
|
77
|
-
#line 122 "./src/util/constants.lzz"
|
|
78
|
-
v8::Global <v8::String> memory;
|
|
79
|
-
#line 123 "./src/util/constants.lzz"
|
|
80
|
-
v8::Global <v8::String> readonly;
|
|
81
|
-
#line 124 "./src/util/constants.lzz"
|
|
82
|
-
v8::Global <v8::String> name;
|
|
83
|
-
#line 125 "./src/util/constants.lzz"
|
|
84
|
-
v8::Global <v8::String> next;
|
|
85
|
-
#line 126 "./src/util/constants.lzz"
|
|
86
|
-
v8::Global <v8::String> length;
|
|
87
|
-
#line 127 "./src/util/constants.lzz"
|
|
88
|
-
v8::Global <v8::String> done;
|
|
89
|
-
#line 128 "./src/util/constants.lzz"
|
|
90
|
-
v8::Global <v8::String> value;
|
|
91
|
-
#line 129 "./src/util/constants.lzz"
|
|
92
|
-
v8::Global <v8::String> changes;
|
|
93
|
-
#line 130 "./src/util/constants.lzz"
|
|
94
|
-
v8::Global <v8::String> lastInsertRowid;
|
|
95
|
-
#line 131 "./src/util/constants.lzz"
|
|
96
|
-
v8::Global <v8::String> statement;
|
|
97
|
-
#line 132 "./src/util/constants.lzz"
|
|
98
|
-
v8::Global <v8::String> column;
|
|
99
|
-
#line 133 "./src/util/constants.lzz"
|
|
100
|
-
v8::Global <v8::String> table;
|
|
101
|
-
#line 134 "./src/util/constants.lzz"
|
|
102
|
-
v8::Global <v8::String> type;
|
|
103
|
-
#line 135 "./src/util/constants.lzz"
|
|
104
|
-
v8::Global <v8::String> totalPages;
|
|
105
|
-
#line 136 "./src/util/constants.lzz"
|
|
106
|
-
v8::Global <v8::String> remainingPages;
|
|
107
|
-
#line 138 "./src/util/constants.lzz"
|
|
108
|
-
private:
|
|
109
|
-
#line 140 "./src/util/constants.lzz"
|
|
110
|
-
static void SetString (v8::Isolate * isolate, v8::Global <v8::String> & constant, char const * str);
|
|
111
|
-
#line 144 "./src/util/constants.lzz"
|
|
112
|
-
void SetCode (v8::Isolate * isolate, int code, char const * str);
|
|
113
|
-
#line 150 "./src/util/constants.lzz"
|
|
114
|
-
std::unordered_map <int, v8::Global<v8::String> > codes;
|
|
115
|
-
};
|
|
116
|
-
#line 1 "./src/util/bind-map.lzz"
|
|
117
|
-
class BindMap
|
|
118
|
-
{
|
|
119
|
-
#line 2 "./src/util/bind-map.lzz"
|
|
120
|
-
public:
|
|
121
|
-
#line 6 "./src/util/bind-map.lzz"
|
|
122
|
-
class Pair
|
|
123
|
-
{
|
|
124
|
-
#line 6 "./src/util/bind-map.lzz"
|
|
125
|
-
friend class BindMap;
|
|
126
|
-
#line 7 "./src/util/bind-map.lzz"
|
|
127
|
-
public:
|
|
128
|
-
#line 9 "./src/util/bind-map.lzz"
|
|
129
|
-
int GetIndex ();
|
|
130
|
-
#line 13 "./src/util/bind-map.lzz"
|
|
131
|
-
v8::Local <v8::String> GetName (v8::Isolate * isolate);
|
|
132
|
-
#line 17 "./src/util/bind-map.lzz"
|
|
133
|
-
private:
|
|
134
|
-
#line 19 "./src/util/bind-map.lzz"
|
|
135
|
-
explicit Pair (v8::Isolate * isolate, char const * name, int index);
|
|
136
|
-
#line 22 "./src/util/bind-map.lzz"
|
|
137
|
-
explicit Pair (v8::Isolate * isolate, Pair * pair);
|
|
138
|
-
#line 25 "./src/util/bind-map.lzz"
|
|
139
|
-
v8::Global <v8::String> const name;
|
|
140
|
-
#line 26 "./src/util/bind-map.lzz"
|
|
141
|
-
int const index;
|
|
142
|
-
};
|
|
143
|
-
#line 29 "./src/util/bind-map.lzz"
|
|
144
|
-
explicit BindMap (char _);
|
|
145
|
-
#line 36 "./src/util/bind-map.lzz"
|
|
146
|
-
~ BindMap ();
|
|
147
|
-
#line 41 "./src/util/bind-map.lzz"
|
|
148
|
-
Pair * GetPairs ();
|
|
149
|
-
#line 45 "./src/util/bind-map.lzz"
|
|
150
|
-
int GetSize ();
|
|
151
|
-
#line 50 "./src/util/bind-map.lzz"
|
|
152
|
-
void Add (v8::Isolate * isolate, char const * name, int index);
|
|
153
|
-
#line 56 "./src/util/bind-map.lzz"
|
|
154
|
-
private:
|
|
155
|
-
#line 58 "./src/util/bind-map.lzz"
|
|
156
|
-
void Grow (v8::Isolate * isolate);
|
|
157
|
-
#line 70 "./src/util/bind-map.lzz"
|
|
158
|
-
Pair * pairs;
|
|
159
|
-
#line 71 "./src/util/bind-map.lzz"
|
|
160
|
-
int capacity;
|
|
161
|
-
#line 72 "./src/util/bind-map.lzz"
|
|
162
|
-
int length;
|
|
163
|
-
};
|
|
164
|
-
#line 20 "./src/better_sqlite3.lzz"
|
|
165
|
-
struct Addon;
|
|
166
|
-
#line 21 "./src/better_sqlite3.lzz"
|
|
167
|
-
class Statement;
|
|
168
|
-
#line 22 "./src/better_sqlite3.lzz"
|
|
169
|
-
class Backup;
|
|
170
|
-
#line 1 "./src/objects/database.lzz"
|
|
171
|
-
class Database : public node::ObjectWrap
|
|
172
|
-
{
|
|
173
|
-
#line 2 "./src/objects/database.lzz"
|
|
174
|
-
public:
|
|
175
|
-
#line 4 "./src/objects/database.lzz"
|
|
176
|
-
static v8::Local <v8 :: Function> Init (v8::Isolate * isolate, v8::Local <v8 :: External> data);
|
|
177
|
-
#line 23 "./src/objects/database.lzz"
|
|
178
|
-
class CompareDatabase
|
|
179
|
-
{
|
|
180
|
-
#line 23 "./src/objects/database.lzz"
|
|
181
|
-
public:
|
|
182
|
-
#line 24 "./src/objects/database.lzz"
|
|
183
|
-
bool operator () (Database const * const a, Database const * const b) const;
|
|
184
|
-
};
|
|
185
|
-
#line 28 "./src/objects/database.lzz"
|
|
186
|
-
class CompareStatement
|
|
187
|
-
{
|
|
188
|
-
#line 28 "./src/objects/database.lzz"
|
|
189
|
-
public:
|
|
190
|
-
#line 29 "./src/objects/database.lzz"
|
|
191
|
-
bool operator () (Statement const * const a, Statement const * const b) const;
|
|
192
|
-
};
|
|
193
|
-
#line 33 "./src/objects/database.lzz"
|
|
194
|
-
class CompareBackup
|
|
195
|
-
{
|
|
196
|
-
#line 33 "./src/objects/database.lzz"
|
|
197
|
-
public:
|
|
198
|
-
#line 34 "./src/objects/database.lzz"
|
|
199
|
-
bool operator () (Backup const * const a, Backup const * const b) const;
|
|
200
|
-
};
|
|
201
|
-
#line 40 "./src/objects/database.lzz"
|
|
202
|
-
void ThrowDatabaseError ();
|
|
203
|
-
#line 44 "./src/objects/database.lzz"
|
|
204
|
-
static void ThrowSqliteError (Addon * addon, sqlite3 * db_handle);
|
|
205
|
-
#line 48 "./src/objects/database.lzz"
|
|
206
|
-
static void ThrowSqliteError (Addon * addon, char const * message, int code);
|
|
207
|
-
#line 64 "./src/objects/database.lzz"
|
|
208
|
-
bool Log (v8::Isolate * isolate, sqlite3_stmt * handle);
|
|
209
|
-
#line 77 "./src/objects/database.lzz"
|
|
210
|
-
void AddStatement (Statement * stmt);
|
|
211
|
-
#line 78 "./src/objects/database.lzz"
|
|
212
|
-
void RemoveStatement (Statement * stmt);
|
|
213
|
-
#line 81 "./src/objects/database.lzz"
|
|
214
|
-
void AddBackup (Backup * backup);
|
|
215
|
-
#line 82 "./src/objects/database.lzz"
|
|
216
|
-
void RemoveBackup (Backup * backup);
|
|
217
|
-
#line 86 "./src/objects/database.lzz"
|
|
218
|
-
struct State
|
|
219
|
-
{
|
|
220
|
-
#line 87 "./src/objects/database.lzz"
|
|
221
|
-
bool const open;
|
|
222
|
-
#line 88 "./src/objects/database.lzz"
|
|
223
|
-
bool busy;
|
|
224
|
-
#line 89 "./src/objects/database.lzz"
|
|
225
|
-
bool const safe_ints;
|
|
226
|
-
#line 90 "./src/objects/database.lzz"
|
|
227
|
-
bool const unsafe_mode;
|
|
228
|
-
#line 91 "./src/objects/database.lzz"
|
|
229
|
-
bool was_js_error;
|
|
230
|
-
#line 92 "./src/objects/database.lzz"
|
|
231
|
-
bool const has_logger;
|
|
232
|
-
#line 93 "./src/objects/database.lzz"
|
|
233
|
-
unsigned short int iterators;
|
|
234
|
-
#line 94 "./src/objects/database.lzz"
|
|
235
|
-
Addon * const addon;
|
|
236
|
-
};
|
|
237
|
-
#line 96 "./src/objects/database.lzz"
|
|
238
|
-
State * GetState ();
|
|
239
|
-
#line 99 "./src/objects/database.lzz"
|
|
240
|
-
sqlite3 * GetHandle ();
|
|
241
|
-
#line 102 "./src/objects/database.lzz"
|
|
242
|
-
Addon * GetAddon ();
|
|
243
|
-
#line 107 "./src/objects/database.lzz"
|
|
244
|
-
void CloseHandles ();
|
|
245
|
-
#line 119 "./src/objects/database.lzz"
|
|
246
|
-
~ Database ();
|
|
247
|
-
#line 124 "./src/objects/database.lzz"
|
|
248
|
-
private:
|
|
249
|
-
#line 126 "./src/objects/database.lzz"
|
|
250
|
-
explicit Database (v8::Isolate * isolate, Addon * addon, sqlite3 * db_handle, v8::Local <v8::Value> logger);
|
|
251
|
-
#line 149 "./src/objects/database.lzz"
|
|
252
|
-
static void JS_new (v8::FunctionCallbackInfo <v8 :: Value> const & info);
|
|
253
|
-
#line 201 "./src/objects/database.lzz"
|
|
254
|
-
static void JS_prepare (v8::FunctionCallbackInfo <v8 :: Value> const & info);
|
|
255
|
-
#line 217 "./src/objects/database.lzz"
|
|
256
|
-
static void JS_exec (v8::FunctionCallbackInfo <v8 :: Value> const & info);
|
|
257
|
-
#line 257 "./src/objects/database.lzz"
|
|
258
|
-
static void JS_backup (v8::FunctionCallbackInfo <v8 :: Value> const & info);
|
|
259
|
-
#line 275 "./src/objects/database.lzz"
|
|
260
|
-
static void JS_serialize (v8::FunctionCallbackInfo <v8 :: Value> const & info);
|
|
261
|
-
#line 297 "./src/objects/database.lzz"
|
|
262
|
-
static void JS_function (v8::FunctionCallbackInfo <v8 :: Value> const & info);
|
|
263
|
-
#line 321 "./src/objects/database.lzz"
|
|
264
|
-
static void JS_aggregate (v8::FunctionCallbackInfo <v8 :: Value> const & info);
|
|
265
|
-
#line 350 "./src/objects/database.lzz"
|
|
266
|
-
static void JS_table (v8::FunctionCallbackInfo <v8 :: Value> const & info);
|
|
267
|
-
#line 392 "./src/objects/database.lzz"
|
|
268
|
-
static void JS_close (v8::FunctionCallbackInfo <v8 :: Value> const & info);
|
|
269
|
-
#line 402 "./src/objects/database.lzz"
|
|
270
|
-
static void JS_defaultSafeIntegers (v8::FunctionCallbackInfo <v8 :: Value> const & info);
|
|
271
|
-
#line 408 "./src/objects/database.lzz"
|
|
272
|
-
static void JS_unsafeMode (v8::FunctionCallbackInfo <v8 :: Value> const & info);
|
|
273
|
-
#line 415 "./src/objects/database.lzz"
|
|
274
|
-
static void JS_open (v8::Local <v8 :: Name> _, v8::PropertyCallbackInfo <v8 :: Value> const & info);
|
|
275
|
-
#line 419 "./src/objects/database.lzz"
|
|
276
|
-
static void JS_inTransaction (v8::Local <v8 :: Name> _, v8::PropertyCallbackInfo <v8 :: Value> const & info);
|
|
277
|
-
#line 424 "./src/objects/database.lzz"
|
|
278
|
-
static bool Deserialize (v8::Local <v8::Object> buffer, Addon * addon, sqlite3 * db_handle, bool readonly);
|
|
279
|
-
#line 449 "./src/objects/database.lzz"
|
|
280
|
-
static void FreeSerialization (char * data, void * _);
|
|
281
|
-
#line 453 "./src/objects/database.lzz"
|
|
282
|
-
static int const MAX_BUFFER_SIZE = node::Buffer::kMaxLength > INT_MAX ? INT_MAX : static_cast<int>(node::Buffer::kMaxLength);
|
|
283
|
-
#line 454 "./src/objects/database.lzz"
|
|
284
|
-
static int const MAX_STRING_SIZE = v8::String::kMaxLength > INT_MAX ? INT_MAX : static_cast<int>(v8::String::kMaxLength);
|
|
285
|
-
#line 456 "./src/objects/database.lzz"
|
|
286
|
-
sqlite3 * const db_handle;
|
|
287
|
-
#line 457 "./src/objects/database.lzz"
|
|
288
|
-
bool open;
|
|
289
|
-
#line 458 "./src/objects/database.lzz"
|
|
290
|
-
bool busy;
|
|
291
|
-
#line 459 "./src/objects/database.lzz"
|
|
292
|
-
bool safe_ints;
|
|
293
|
-
#line 460 "./src/objects/database.lzz"
|
|
294
|
-
bool unsafe_mode;
|
|
295
|
-
#line 461 "./src/objects/database.lzz"
|
|
296
|
-
bool was_js_error;
|
|
297
|
-
#line 462 "./src/objects/database.lzz"
|
|
298
|
-
bool const has_logger;
|
|
299
|
-
#line 463 "./src/objects/database.lzz"
|
|
300
|
-
unsigned short int iterators;
|
|
301
|
-
#line 464 "./src/objects/database.lzz"
|
|
302
|
-
Addon * const addon;
|
|
303
|
-
#line 465 "./src/objects/database.lzz"
|
|
304
|
-
v8::Global <v8::Value> const logger;
|
|
305
|
-
#line 466 "./src/objects/database.lzz"
|
|
306
|
-
std::set <Statement*, CompareStatement> stmts;
|
|
307
|
-
#line 467 "./src/objects/database.lzz"
|
|
308
|
-
std::set <Backup*, CompareBackup> backups;
|
|
309
|
-
};
|
|
310
|
-
#line 1 "./src/objects/statement.lzz"
|
|
311
|
-
class Statement : public node::ObjectWrap
|
|
312
|
-
{
|
|
313
|
-
#line 1 "./src/objects/statement.lzz"
|
|
314
|
-
friend class StatementIterator;
|
|
315
|
-
#line 2 "./src/objects/statement.lzz"
|
|
316
|
-
public:
|
|
317
|
-
#line 4 "./src/objects/statement.lzz"
|
|
318
|
-
static v8::Local <v8 :: Function> Init (v8::Isolate * isolate, v8::Local <v8 :: External> data);
|
|
319
|
-
#line 21 "./src/objects/statement.lzz"
|
|
320
|
-
static bool Compare (Statement const * const a, Statement const * const b);
|
|
321
|
-
#line 26 "./src/objects/statement.lzz"
|
|
322
|
-
BindMap * GetBindMap (v8::Isolate * isolate);
|
|
323
|
-
#line 39 "./src/objects/statement.lzz"
|
|
324
|
-
void CloseHandles ();
|
|
325
|
-
#line 46 "./src/objects/statement.lzz"
|
|
326
|
-
~ Statement ();
|
|
327
|
-
#line 52 "./src/objects/statement.lzz"
|
|
328
|
-
private:
|
|
329
|
-
#line 55 "./src/objects/statement.lzz"
|
|
330
|
-
class Extras
|
|
331
|
-
{
|
|
332
|
-
#line 55 "./src/objects/statement.lzz"
|
|
333
|
-
friend class Statement;
|
|
334
|
-
#line 56 "./src/objects/statement.lzz"
|
|
335
|
-
explicit Extras (sqlite3_uint64 id);
|
|
336
|
-
#line 57 "./src/objects/statement.lzz"
|
|
337
|
-
BindMap bind_map;
|
|
338
|
-
#line 58 "./src/objects/statement.lzz"
|
|
339
|
-
sqlite3_uint64 const id;
|
|
340
|
-
};
|
|
341
|
-
#line 61 "./src/objects/statement.lzz"
|
|
342
|
-
explicit Statement (Database * db, sqlite3_stmt * handle, sqlite3_uint64 id, bool returns_data);
|
|
343
|
-
#line 85 "./src/objects/statement.lzz"
|
|
344
|
-
static void JS_new (v8::FunctionCallbackInfo <v8 :: Value> const & info);
|
|
345
|
-
#line 156 "./src/objects/statement.lzz"
|
|
346
|
-
static void JS_run (v8::FunctionCallbackInfo <v8 :: Value> const & info);
|
|
347
|
-
#line 179 "./src/objects/statement.lzz"
|
|
348
|
-
static void JS_get (v8::FunctionCallbackInfo <v8 :: Value> const & info);
|
|
349
|
-
#line 194 "./src/objects/statement.lzz"
|
|
350
|
-
static void JS_all (v8::FunctionCallbackInfo <v8 :: Value> const & info);
|
|
351
|
-
#line 215 "./src/objects/statement.lzz"
|
|
352
|
-
static void JS_iterate (v8::FunctionCallbackInfo <v8 :: Value> const & info);
|
|
353
|
-
#line 225 "./src/objects/statement.lzz"
|
|
354
|
-
static void JS_bind (v8::FunctionCallbackInfo <v8 :: Value> const & info);
|
|
355
|
-
#line 236 "./src/objects/statement.lzz"
|
|
356
|
-
static void JS_pluck (v8::FunctionCallbackInfo <v8 :: Value> const & info);
|
|
357
|
-
#line 247 "./src/objects/statement.lzz"
|
|
358
|
-
static void JS_expand (v8::FunctionCallbackInfo <v8 :: Value> const & info);
|
|
359
|
-
#line 258 "./src/objects/statement.lzz"
|
|
360
|
-
static void JS_raw (v8::FunctionCallbackInfo <v8 :: Value> const & info);
|
|
361
|
-
#line 269 "./src/objects/statement.lzz"
|
|
362
|
-
static void JS_safeIntegers (v8::FunctionCallbackInfo <v8 :: Value> const & info);
|
|
363
|
-
#line 278 "./src/objects/statement.lzz"
|
|
364
|
-
static void JS_columns (v8::FunctionCallbackInfo <v8 :: Value> const & info);
|
|
365
|
-
#line 322 "./src/objects/statement.lzz"
|
|
366
|
-
static void JS_scanStatusV2 (v8::FunctionCallbackInfo <v8 :: Value> const & info);
|
|
367
|
-
#line 370 "./src/objects/statement.lzz"
|
|
368
|
-
static void JS_busy (v8::Local <v8 :: Name> _, v8::PropertyCallbackInfo <v8 :: Value> const & info);
|
|
369
|
-
#line 326 "./src/objects/statement.lzz"
|
|
370
|
-
Database * const db;
|
|
371
|
-
#line 327 "./src/objects/statement.lzz"
|
|
372
|
-
sqlite3_stmt * const handle;
|
|
373
|
-
#line 328 "./src/objects/statement.lzz"
|
|
374
|
-
Extras * const extras;
|
|
375
|
-
#line 329 "./src/objects/statement.lzz"
|
|
376
|
-
bool alive;
|
|
377
|
-
#line 330 "./src/objects/statement.lzz"
|
|
378
|
-
bool locked;
|
|
379
|
-
#line 331 "./src/objects/statement.lzz"
|
|
380
|
-
bool bound;
|
|
381
|
-
#line 332 "./src/objects/statement.lzz"
|
|
382
|
-
bool has_bind_map;
|
|
383
|
-
#line 333 "./src/objects/statement.lzz"
|
|
384
|
-
bool safe_ints;
|
|
385
|
-
#line 334 "./src/objects/statement.lzz"
|
|
386
|
-
char mode;
|
|
387
|
-
#line 335 "./src/objects/statement.lzz"
|
|
388
|
-
bool const returns_data;
|
|
389
|
-
};
|
|
390
|
-
#line 1 "./src/objects/statement-iterator.lzz"
|
|
391
|
-
class StatementIterator : public node::ObjectWrap
|
|
392
|
-
{
|
|
393
|
-
#line 2 "./src/objects/statement-iterator.lzz"
|
|
394
|
-
public:
|
|
395
|
-
#line 4 "./src/objects/statement-iterator.lzz"
|
|
396
|
-
static v8::Local <v8 :: Function> Init (v8::Isolate * isolate, v8::Local <v8 :: External> data);
|
|
397
|
-
#line 15 "./src/objects/statement-iterator.lzz"
|
|
398
|
-
~ StatementIterator ();
|
|
399
|
-
#line 17 "./src/objects/statement-iterator.lzz"
|
|
400
|
-
private:
|
|
401
|
-
#line 19 "./src/objects/statement-iterator.lzz"
|
|
402
|
-
explicit StatementIterator (Statement * stmt, bool bound);
|
|
403
|
-
#line 38 "./src/objects/statement-iterator.lzz"
|
|
404
|
-
static void JS_new (v8::FunctionCallbackInfo <v8 :: Value> const & info);
|
|
405
|
-
#line 57 "./src/objects/statement-iterator.lzz"
|
|
406
|
-
static void JS_next (v8::FunctionCallbackInfo <v8 :: Value> const & info);
|
|
407
|
-
#line 64 "./src/objects/statement-iterator.lzz"
|
|
408
|
-
static void JS_return (v8::FunctionCallbackInfo <v8 :: Value> const & info);
|
|
409
|
-
#line 71 "./src/objects/statement-iterator.lzz"
|
|
410
|
-
static void JS_symbolIterator (v8::FunctionCallbackInfo <v8 :: Value> const & info);
|
|
411
|
-
#line 75 "./src/objects/statement-iterator.lzz"
|
|
412
|
-
void Next (v8::FunctionCallbackInfo <v8 :: Value> const & info);
|
|
413
|
-
#line 100 "./src/objects/statement-iterator.lzz"
|
|
414
|
-
void Return (v8::FunctionCallbackInfo <v8 :: Value> const & info);
|
|
415
|
-
#line 105 "./src/objects/statement-iterator.lzz"
|
|
416
|
-
void Throw ();
|
|
417
|
-
#line 111 "./src/objects/statement-iterator.lzz"
|
|
418
|
-
void Cleanup ();
|
|
419
|
-
#line 119 "./src/objects/statement-iterator.lzz"
|
|
420
|
-
static v8::Local <v8::Object> NewRecord (v8::Isolate * isolate, v8::Local <v8::Context> ctx, v8::Local <v8::Value> value, Addon * addon, bool done);
|
|
421
|
-
#line 126 "./src/objects/statement-iterator.lzz"
|
|
422
|
-
static v8::Local <v8::Object> DoneRecord (v8::Isolate * isolate, Addon * addon);
|
|
423
|
-
#line 130 "./src/objects/statement-iterator.lzz"
|
|
424
|
-
Statement * const stmt;
|
|
425
|
-
#line 131 "./src/objects/statement-iterator.lzz"
|
|
426
|
-
sqlite3_stmt * const handle;
|
|
427
|
-
#line 132 "./src/objects/statement-iterator.lzz"
|
|
428
|
-
Database::State * const db_state;
|
|
429
|
-
#line 133 "./src/objects/statement-iterator.lzz"
|
|
430
|
-
bool const bound;
|
|
431
|
-
#line 134 "./src/objects/statement-iterator.lzz"
|
|
432
|
-
bool const safe_ints;
|
|
433
|
-
#line 135 "./src/objects/statement-iterator.lzz"
|
|
434
|
-
char const mode;
|
|
435
|
-
#line 136 "./src/objects/statement-iterator.lzz"
|
|
436
|
-
bool alive;
|
|
437
|
-
#line 137 "./src/objects/statement-iterator.lzz"
|
|
438
|
-
bool logged;
|
|
439
|
-
};
|
|
440
|
-
#line 1 "./src/objects/backup.lzz"
|
|
441
|
-
class Backup : public node::ObjectWrap
|
|
442
|
-
{
|
|
443
|
-
#line 2 "./src/objects/backup.lzz"
|
|
444
|
-
public:
|
|
445
|
-
#line 4 "./src/objects/backup.lzz"
|
|
446
|
-
static v8::Local <v8 :: Function> Init (v8::Isolate * isolate, v8::Local <v8 :: External> data);
|
|
447
|
-
#line 12 "./src/objects/backup.lzz"
|
|
448
|
-
static bool Compare (Backup const * const a, Backup const * const b);
|
|
449
|
-
#line 17 "./src/objects/backup.lzz"
|
|
450
|
-
void CloseHandles ();
|
|
451
|
-
#line 28 "./src/objects/backup.lzz"
|
|
452
|
-
~ Backup ();
|
|
453
|
-
#line 33 "./src/objects/backup.lzz"
|
|
454
|
-
private:
|
|
455
|
-
#line 35 "./src/objects/backup.lzz"
|
|
456
|
-
explicit Backup (Database * db, sqlite3 * dest_handle, sqlite3_backup * backup_handle, sqlite3_uint64 id, bool unlink);
|
|
457
|
-
#line 55 "./src/objects/backup.lzz"
|
|
458
|
-
static void JS_new (v8::FunctionCallbackInfo <v8 :: Value> const & info);
|
|
459
|
-
#line 98 "./src/objects/backup.lzz"
|
|
460
|
-
static void JS_transfer (v8::FunctionCallbackInfo <v8 :: Value> const & info);
|
|
461
|
-
#line 124 "./src/objects/backup.lzz"
|
|
462
|
-
static void JS_close (v8::FunctionCallbackInfo <v8 :: Value> const & info);
|
|
463
|
-
#line 132 "./src/objects/backup.lzz"
|
|
464
|
-
Database * const db;
|
|
465
|
-
#line 133 "./src/objects/backup.lzz"
|
|
466
|
-
sqlite3 * const dest_handle;
|
|
467
|
-
#line 134 "./src/objects/backup.lzz"
|
|
468
|
-
sqlite3_backup * const backup_handle;
|
|
469
|
-
#line 135 "./src/objects/backup.lzz"
|
|
470
|
-
sqlite3_uint64 const id;
|
|
471
|
-
#line 136 "./src/objects/backup.lzz"
|
|
472
|
-
bool alive;
|
|
473
|
-
#line 137 "./src/objects/backup.lzz"
|
|
474
|
-
bool unlink;
|
|
475
|
-
};
|
|
476
|
-
#line 1 "./src/util/data-converter.lzz"
|
|
477
|
-
class DataConverter
|
|
478
|
-
{
|
|
479
|
-
#line 2 "./src/util/data-converter.lzz"
|
|
480
|
-
public:
|
|
481
|
-
#line 4 "./src/util/data-converter.lzz"
|
|
482
|
-
void ThrowDataConversionError (sqlite3_context * invocation, bool isBigInt);
|
|
483
|
-
#line 13 "./src/util/data-converter.lzz"
|
|
484
|
-
protected:
|
|
485
|
-
#line 15 "./src/util/data-converter.lzz"
|
|
486
|
-
virtual void PropagateJSError (sqlite3_context * invocation) = 0;
|
|
487
|
-
#line 16 "./src/util/data-converter.lzz"
|
|
488
|
-
virtual std::string GetDataErrorPrefix () = 0;
|
|
489
|
-
};
|
|
490
|
-
#line 1 "./src/util/custom-function.lzz"
|
|
491
|
-
class CustomFunction : protected DataConverter
|
|
492
|
-
{
|
|
493
|
-
#line 2 "./src/util/custom-function.lzz"
|
|
494
|
-
public:
|
|
495
|
-
#line 4 "./src/util/custom-function.lzz"
|
|
496
|
-
explicit CustomFunction (v8::Isolate * isolate, Database * db, char const * name, v8::Local <v8::Function> fn, bool safe_ints);
|
|
497
|
-
#line 17 "./src/util/custom-function.lzz"
|
|
498
|
-
virtual ~ CustomFunction ();
|
|
499
|
-
#line 19 "./src/util/custom-function.lzz"
|
|
500
|
-
static void xDestroy (void * self);
|
|
501
|
-
#line 23 "./src/util/custom-function.lzz"
|
|
502
|
-
static void xFunc (sqlite3_context * invocation, int argc, sqlite3_value * * argv);
|
|
503
|
-
#line 40 "./src/util/custom-function.lzz"
|
|
504
|
-
protected:
|
|
505
|
-
#line 42 "./src/util/custom-function.lzz"
|
|
506
|
-
void PropagateJSError (sqlite3_context * invocation);
|
|
507
|
-
#line 48 "./src/util/custom-function.lzz"
|
|
508
|
-
std::string GetDataErrorPrefix ();
|
|
509
|
-
#line 52 "./src/util/custom-function.lzz"
|
|
510
|
-
private:
|
|
511
|
-
#line 53 "./src/util/custom-function.lzz"
|
|
512
|
-
std::string const name;
|
|
513
|
-
#line 54 "./src/util/custom-function.lzz"
|
|
514
|
-
Database * const db;
|
|
515
|
-
#line 55 "./src/util/custom-function.lzz"
|
|
516
|
-
protected:
|
|
517
|
-
#line 56 "./src/util/custom-function.lzz"
|
|
518
|
-
v8::Isolate * const isolate;
|
|
519
|
-
#line 57 "./src/util/custom-function.lzz"
|
|
520
|
-
v8::Global <v8::Function> const fn;
|
|
521
|
-
#line 58 "./src/util/custom-function.lzz"
|
|
522
|
-
bool const safe_ints;
|
|
523
|
-
};
|
|
524
|
-
#line 1 "./src/util/custom-aggregate.lzz"
|
|
525
|
-
class CustomAggregate : public CustomFunction
|
|
526
|
-
{
|
|
527
|
-
#line 2 "./src/util/custom-aggregate.lzz"
|
|
528
|
-
public:
|
|
529
|
-
#line 4 "./src/util/custom-aggregate.lzz"
|
|
530
|
-
explicit CustomAggregate (v8::Isolate * isolate, Database * db, char const * name, v8::Local <v8::Value> start, v8::Local <v8::Function> step, v8::Local <v8::Value> inverse, v8::Local <v8::Value> result, bool safe_ints);
|
|
531
|
-
#line 21 "./src/util/custom-aggregate.lzz"
|
|
532
|
-
static void xStep (sqlite3_context * invocation, int argc, sqlite3_value * * argv);
|
|
533
|
-
#line 25 "./src/util/custom-aggregate.lzz"
|
|
534
|
-
static void xInverse (sqlite3_context * invocation, int argc, sqlite3_value * * argv);
|
|
535
|
-
#line 29 "./src/util/custom-aggregate.lzz"
|
|
536
|
-
static void xValue (sqlite3_context * invocation);
|
|
537
|
-
#line 33 "./src/util/custom-aggregate.lzz"
|
|
538
|
-
static void xFinal (sqlite3_context * invocation);
|
|
539
|
-
#line 37 "./src/util/custom-aggregate.lzz"
|
|
540
|
-
private:
|
|
541
|
-
#line 39 "./src/util/custom-aggregate.lzz"
|
|
542
|
-
static void xStepBase (sqlite3_context * invocation, int argc, sqlite3_value * * argv, v8::Global <v8::Function> const CustomAggregate::* ptrtm);
|
|
543
|
-
#line 58 "./src/util/custom-aggregate.lzz"
|
|
544
|
-
static void xValueBase (sqlite3_context * invocation, bool is_final);
|
|
545
|
-
#line 82 "./src/util/custom-aggregate.lzz"
|
|
546
|
-
struct Accumulator
|
|
547
|
-
{
|
|
548
|
-
#line 82 "./src/util/custom-aggregate.lzz"
|
|
549
|
-
public:
|
|
550
|
-
#line 83 "./src/util/custom-aggregate.lzz"
|
|
551
|
-
v8::Global <v8::Value> value;
|
|
552
|
-
#line 84 "./src/util/custom-aggregate.lzz"
|
|
553
|
-
bool initialized;
|
|
554
|
-
#line 85 "./src/util/custom-aggregate.lzz"
|
|
555
|
-
bool is_window;
|
|
556
|
-
};
|
|
557
|
-
#line 88 "./src/util/custom-aggregate.lzz"
|
|
558
|
-
Accumulator * GetAccumulator (sqlite3_context * invocation);
|
|
559
|
-
#line 105 "./src/util/custom-aggregate.lzz"
|
|
560
|
-
static void DestroyAccumulator (sqlite3_context * invocation);
|
|
561
|
-
#line 111 "./src/util/custom-aggregate.lzz"
|
|
562
|
-
void PropagateJSError (sqlite3_context * invocation);
|
|
563
|
-
#line 116 "./src/util/custom-aggregate.lzz"
|
|
564
|
-
bool const invoke_result;
|
|
565
|
-
#line 117 "./src/util/custom-aggregate.lzz"
|
|
566
|
-
bool const invoke_start;
|
|
567
|
-
#line 118 "./src/util/custom-aggregate.lzz"
|
|
568
|
-
v8::Global <v8::Function> const inverse;
|
|
569
|
-
#line 119 "./src/util/custom-aggregate.lzz"
|
|
570
|
-
v8::Global <v8::Function> const result;
|
|
571
|
-
#line 120 "./src/util/custom-aggregate.lzz"
|
|
572
|
-
v8::Global <v8::Value> const start;
|
|
573
|
-
};
|
|
574
|
-
#line 1 "./src/util/custom-table.lzz"
|
|
575
|
-
class CustomTable
|
|
576
|
-
{
|
|
577
|
-
#line 2 "./src/util/custom-table.lzz"
|
|
578
|
-
public:
|
|
579
|
-
#line 4 "./src/util/custom-table.lzz"
|
|
580
|
-
explicit CustomTable (v8::Isolate * isolate, Database * db, char const * name, v8::Local <v8::Function> factory);
|
|
581
|
-
#line 16 "./src/util/custom-table.lzz"
|
|
582
|
-
static void Destructor (void * self);
|
|
583
|
-
#line 20 "./src/util/custom-table.lzz"
|
|
584
|
-
static sqlite3_module MODULE;
|
|
585
|
-
#line 47 "./src/util/custom-table.lzz"
|
|
586
|
-
static sqlite3_module EPONYMOUS_MODULE;
|
|
587
|
-
#line 74 "./src/util/custom-table.lzz"
|
|
588
|
-
private:
|
|
589
|
-
#line 77 "./src/util/custom-table.lzz"
|
|
590
|
-
class VTab
|
|
591
|
-
{
|
|
592
|
-
#line 77 "./src/util/custom-table.lzz"
|
|
593
|
-
friend class CustomTable;
|
|
594
|
-
#line 78 "./src/util/custom-table.lzz"
|
|
595
|
-
explicit VTab (CustomTable * parent, v8::Local <v8::Function> generator, std::vector <std::string> parameter_names, bool safe_ints);
|
|
596
|
-
#line 92 "./src/util/custom-table.lzz"
|
|
597
|
-
static CustomTable::VTab * Upcast (sqlite3_vtab * vtab);
|
|
598
|
-
#line 96 "./src/util/custom-table.lzz"
|
|
599
|
-
sqlite3_vtab * Downcast ();
|
|
600
|
-
#line 100 "./src/util/custom-table.lzz"
|
|
601
|
-
sqlite3_vtab base;
|
|
602
|
-
#line 101 "./src/util/custom-table.lzz"
|
|
603
|
-
CustomTable * const parent;
|
|
604
|
-
#line 102 "./src/util/custom-table.lzz"
|
|
605
|
-
int const parameter_count;
|
|
606
|
-
#line 103 "./src/util/custom-table.lzz"
|
|
607
|
-
bool const safe_ints;
|
|
608
|
-
#line 104 "./src/util/custom-table.lzz"
|
|
609
|
-
v8::Global <v8::Function> const generator;
|
|
610
|
-
#line 105 "./src/util/custom-table.lzz"
|
|
611
|
-
std::vector <std::string> const parameter_names;
|
|
612
|
-
};
|
|
613
|
-
#line 109 "./src/util/custom-table.lzz"
|
|
614
|
-
class Cursor
|
|
615
|
-
{
|
|
616
|
-
#line 109 "./src/util/custom-table.lzz"
|
|
617
|
-
friend class CustomTable;
|
|
618
|
-
#line 110 "./src/util/custom-table.lzz"
|
|
619
|
-
static CustomTable::Cursor * Upcast (sqlite3_vtab_cursor * cursor);
|
|
620
|
-
#line 114 "./src/util/custom-table.lzz"
|
|
621
|
-
sqlite3_vtab_cursor * Downcast ();
|
|
622
|
-
#line 118 "./src/util/custom-table.lzz"
|
|
623
|
-
CustomTable::VTab * GetVTab ();
|
|
624
|
-
#line 122 "./src/util/custom-table.lzz"
|
|
625
|
-
sqlite3_vtab_cursor base;
|
|
626
|
-
#line 123 "./src/util/custom-table.lzz"
|
|
627
|
-
v8::Global <v8::Object> iterator;
|
|
628
|
-
#line 124 "./src/util/custom-table.lzz"
|
|
629
|
-
v8::Global <v8::Function> next;
|
|
630
|
-
#line 125 "./src/util/custom-table.lzz"
|
|
631
|
-
v8::Global <v8::Array> row;
|
|
632
|
-
#line 126 "./src/util/custom-table.lzz"
|
|
633
|
-
bool done;
|
|
634
|
-
#line 127 "./src/util/custom-table.lzz"
|
|
635
|
-
sqlite_int64 rowid;
|
|
636
|
-
};
|
|
637
|
-
#line 131 "./src/util/custom-table.lzz"
|
|
638
|
-
class TempDataConverter : DataConverter
|
|
639
|
-
{
|
|
640
|
-
#line 131 "./src/util/custom-table.lzz"
|
|
641
|
-
friend class CustomTable;
|
|
642
|
-
#line 132 "./src/util/custom-table.lzz"
|
|
643
|
-
explicit TempDataConverter (CustomTable * parent);
|
|
644
|
-
#line 136 "./src/util/custom-table.lzz"
|
|
645
|
-
void PropagateJSError (sqlite3_context * invocation);
|
|
646
|
-
#line 141 "./src/util/custom-table.lzz"
|
|
647
|
-
std::string GetDataErrorPrefix ();
|
|
648
|
-
#line 145 "./src/util/custom-table.lzz"
|
|
649
|
-
CustomTable * const parent;
|
|
650
|
-
#line 146 "./src/util/custom-table.lzz"
|
|
651
|
-
int status;
|
|
652
|
-
};
|
|
653
|
-
#line 151 "./src/util/custom-table.lzz"
|
|
654
|
-
static int xCreate (sqlite3 * db_handle, void * _self, int argc, char const * const * argv, sqlite3_vtab * * output, char * * errOutput);
|
|
655
|
-
#line 156 "./src/util/custom-table.lzz"
|
|
656
|
-
static int xConnect (sqlite3 * db_handle, void * _self, int argc, char const * const * argv, sqlite3_vtab * * output, char * * errOutput);
|
|
657
|
-
#line 210 "./src/util/custom-table.lzz"
|
|
658
|
-
static int xDisconnect (sqlite3_vtab * vtab);
|
|
659
|
-
#line 215 "./src/util/custom-table.lzz"
|
|
660
|
-
static int xOpen (sqlite3_vtab * vtab, sqlite3_vtab_cursor * * output);
|
|
661
|
-
#line 220 "./src/util/custom-table.lzz"
|
|
662
|
-
static int xClose (sqlite3_vtab_cursor * cursor);
|
|
663
|
-
#line 228 "./src/util/custom-table.lzz"
|
|
664
|
-
static int xFilter (sqlite3_vtab_cursor * _cursor, int idxNum, char const * idxStr, int argc, sqlite3_value * * argv);
|
|
665
|
-
#line 284 "./src/util/custom-table.lzz"
|
|
666
|
-
static int xNext (sqlite3_vtab_cursor * _cursor);
|
|
667
|
-
#line 313 "./src/util/custom-table.lzz"
|
|
668
|
-
static int xEof (sqlite3_vtab_cursor * cursor);
|
|
669
|
-
#line 318 "./src/util/custom-table.lzz"
|
|
670
|
-
static int xColumn (sqlite3_vtab_cursor * _cursor, sqlite3_context * invocation, int column);
|
|
671
|
-
#line 336 "./src/util/custom-table.lzz"
|
|
672
|
-
static int xRowid (sqlite3_vtab_cursor * cursor, sqlite_int64 * output);
|
|
673
|
-
#line 343 "./src/util/custom-table.lzz"
|
|
674
|
-
static int xBestIndex (sqlite3_vtab * vtab, sqlite3_index_info * output);
|
|
675
|
-
#line 394 "./src/util/custom-table.lzz"
|
|
676
|
-
void PropagateJSError ();
|
|
677
|
-
#line 399 "./src/util/custom-table.lzz"
|
|
678
|
-
Addon * const addon;
|
|
679
|
-
#line 400 "./src/util/custom-table.lzz"
|
|
680
|
-
v8::Isolate * const isolate;
|
|
681
|
-
#line 401 "./src/util/custom-table.lzz"
|
|
682
|
-
Database * const db;
|
|
683
|
-
#line 402 "./src/util/custom-table.lzz"
|
|
684
|
-
std::string const name;
|
|
685
|
-
#line 403 "./src/util/custom-table.lzz"
|
|
686
|
-
v8::Global <v8::Function> const factory;
|
|
687
|
-
};
|
|
688
|
-
#line 65 "./src/util/data.lzz"
|
|
689
|
-
namespace Data
|
|
690
|
-
{
|
|
691
|
-
#line 72 "./src/util/data.lzz"
|
|
692
|
-
v8::Local <v8::Value> GetValueJS (v8::Isolate * isolate, sqlite3_stmt * handle, int column, bool safe_ints);
|
|
693
|
-
}
|
|
694
|
-
#line 65 "./src/util/data.lzz"
|
|
695
|
-
namespace Data
|
|
696
|
-
{
|
|
697
|
-
#line 76 "./src/util/data.lzz"
|
|
698
|
-
v8::Local <v8::Value> GetValueJS (v8::Isolate * isolate, sqlite3_value * value, bool safe_ints);
|
|
699
|
-
}
|
|
700
|
-
#line 65 "./src/util/data.lzz"
|
|
701
|
-
namespace Data
|
|
702
|
-
{
|
|
703
|
-
#line 80 "./src/util/data.lzz"
|
|
704
|
-
v8::Local <v8::Value> GetFlatRowJS (v8::Isolate * isolate, v8::Local <v8::Context> ctx, sqlite3_stmt * handle, bool safe_ints);
|
|
705
|
-
}
|
|
706
|
-
#line 65 "./src/util/data.lzz"
|
|
707
|
-
namespace Data
|
|
708
|
-
{
|
|
709
|
-
#line 91 "./src/util/data.lzz"
|
|
710
|
-
v8::Local <v8::Value> GetExpandedRowJS (v8::Isolate * isolate, v8::Local <v8::Context> ctx, sqlite3_stmt * handle, bool safe_ints);
|
|
711
|
-
}
|
|
712
|
-
#line 65 "./src/util/data.lzz"
|
|
713
|
-
namespace Data
|
|
714
|
-
{
|
|
715
|
-
#line 110 "./src/util/data.lzz"
|
|
716
|
-
v8::Local <v8::Value> GetRawRowJS (v8::Isolate * isolate, v8::Local <v8::Context> ctx, sqlite3_stmt * handle, bool safe_ints);
|
|
717
|
-
}
|
|
718
|
-
#line 65 "./src/util/data.lzz"
|
|
719
|
-
namespace Data
|
|
720
|
-
{
|
|
721
|
-
#line 119 "./src/util/data.lzz"
|
|
722
|
-
v8::Local <v8::Value> GetRowJS (v8::Isolate * isolate, v8::Local <v8::Context> ctx, sqlite3_stmt * handle, bool safe_ints, char mode);
|
|
723
|
-
}
|
|
724
|
-
#line 65 "./src/util/data.lzz"
|
|
725
|
-
namespace Data
|
|
726
|
-
{
|
|
727
|
-
#line 128 "./src/util/data.lzz"
|
|
728
|
-
void GetArgumentsJS (v8::Isolate * isolate, v8::Local <v8::Value> * out, sqlite3_value * * values, int argument_count, bool safe_ints);
|
|
729
|
-
}
|
|
730
|
-
#line 65 "./src/util/data.lzz"
|
|
731
|
-
namespace Data
|
|
732
|
-
{
|
|
733
|
-
#line 135 "./src/util/data.lzz"
|
|
734
|
-
int BindValueFromJS (v8::Isolate * isolate, sqlite3_stmt * handle, int index, v8::Local <v8::Value> value);
|
|
735
|
-
}
|
|
736
|
-
#line 65 "./src/util/data.lzz"
|
|
737
|
-
namespace Data
|
|
738
|
-
{
|
|
739
|
-
#line 140 "./src/util/data.lzz"
|
|
740
|
-
void ResultValueFromJS (v8::Isolate * isolate, sqlite3_context * invocation, v8::Local <v8::Value> value, DataConverter * converter);
|
|
741
|
-
}
|
|
742
|
-
#line 1 "./src/util/binder.lzz"
|
|
743
|
-
class Binder
|
|
744
|
-
{
|
|
745
|
-
#line 2 "./src/util/binder.lzz"
|
|
746
|
-
public:
|
|
747
|
-
#line 4 "./src/util/binder.lzz"
|
|
748
|
-
explicit Binder (sqlite3_stmt * _handle);
|
|
749
|
-
#line 11 "./src/util/binder.lzz"
|
|
750
|
-
bool Bind (v8::FunctionCallbackInfo <v8 :: Value> const & info, int argc, Statement * stmt);
|
|
751
|
-
#line 28 "./src/util/binder.lzz"
|
|
752
|
-
private:
|
|
753
|
-
#line 30 "./src/util/binder.lzz"
|
|
754
|
-
struct Result
|
|
755
|
-
{
|
|
756
|
-
#line 31 "./src/util/binder.lzz"
|
|
757
|
-
int count;
|
|
758
|
-
#line 32 "./src/util/binder.lzz"
|
|
759
|
-
bool bound_object;
|
|
760
|
-
};
|
|
761
|
-
#line 55 "./src/util/binder.lzz"
|
|
762
|
-
void Fail (void (* Throw) (char const *), char const * message);
|
|
763
|
-
#line 63 "./src/util/binder.lzz"
|
|
764
|
-
int NextAnonIndex ();
|
|
765
|
-
#line 69 "./src/util/binder.lzz"
|
|
766
|
-
void BindValue (v8::Isolate * isolate, v8::Local <v8::Value> value, int index);
|
|
767
|
-
#line 90 "./src/util/binder.lzz"
|
|
768
|
-
int BindArray (v8::Isolate * isolate, v8::Local <v8::Array> arr);
|
|
769
|
-
#line 116 "./src/util/binder.lzz"
|
|
770
|
-
int BindObject (v8::Isolate * isolate, v8::Local <v8::Object> obj, Statement * stmt);
|
|
771
|
-
#line 160 "./src/util/binder.lzz"
|
|
772
|
-
Result BindArgs (v8::FunctionCallbackInfo <v8 :: Value> const & info, int argc, Statement * stmt);
|
|
773
|
-
#line 200 "./src/util/binder.lzz"
|
|
774
|
-
sqlite3_stmt * handle;
|
|
775
|
-
#line 201 "./src/util/binder.lzz"
|
|
776
|
-
int param_count;
|
|
777
|
-
#line 202 "./src/util/binder.lzz"
|
|
778
|
-
int anon_index;
|
|
779
|
-
#line 203 "./src/util/binder.lzz"
|
|
780
|
-
bool success;
|
|
781
|
-
};
|
|
782
|
-
#line 34 "./src/better_sqlite3.lzz"
|
|
783
|
-
struct Addon
|
|
784
|
-
{
|
|
785
|
-
#line 35 "./src/better_sqlite3.lzz"
|
|
786
|
-
static void JS_setErrorConstructor (v8::FunctionCallbackInfo <v8 :: Value> const & info);
|
|
787
|
-
#line 40 "./src/better_sqlite3.lzz"
|
|
788
|
-
static void Cleanup (void * ptr);
|
|
789
|
-
#line 47 "./src/better_sqlite3.lzz"
|
|
790
|
-
explicit Addon (v8::Isolate * isolate);
|
|
791
|
-
#line 52 "./src/better_sqlite3.lzz"
|
|
792
|
-
sqlite3_uint64 NextId ();
|
|
793
|
-
#line 56 "./src/better_sqlite3.lzz"
|
|
794
|
-
v8::Global <v8::Function> Statement;
|
|
795
|
-
#line 57 "./src/better_sqlite3.lzz"
|
|
796
|
-
v8::Global <v8::Function> StatementIterator;
|
|
797
|
-
#line 58 "./src/better_sqlite3.lzz"
|
|
798
|
-
v8::Global <v8::Function> Backup;
|
|
799
|
-
#line 59 "./src/better_sqlite3.lzz"
|
|
800
|
-
v8::Global <v8::Function> SqliteError;
|
|
801
|
-
#line 60 "./src/better_sqlite3.lzz"
|
|
802
|
-
v8::FunctionCallbackInfo <v8 :: Value> const * privileged_info;
|
|
803
|
-
#line 61 "./src/better_sqlite3.lzz"
|
|
804
|
-
sqlite3_uint64 next_id;
|
|
805
|
-
#line 62 "./src/better_sqlite3.lzz"
|
|
806
|
-
CS cs;
|
|
807
|
-
#line 63 "./src/better_sqlite3.lzz"
|
|
808
|
-
std::set <Database*, Database::CompareDatabase> dbs;
|
|
809
|
-
};
|
|
810
|
-
#line 20 "./src/util/macros.lzz"
|
|
811
|
-
LZZ_INLINE v8::Local <v8::String> StringFromUtf8 (v8::Isolate * isolate, char const * data, int length)
|
|
812
|
-
#line 20 "./src/util/macros.lzz"
|
|
813
|
-
{
|
|
814
|
-
return v8::String::NewFromUtf8(isolate, data, v8::NewStringType::kNormal, length).ToLocalChecked();
|
|
815
|
-
}
|
|
816
|
-
#line 23 "./src/util/macros.lzz"
|
|
817
|
-
LZZ_INLINE v8::Local <v8::String> InternalizedFromUtf8 (v8::Isolate * isolate, char const * data, int length)
|
|
818
|
-
#line 23 "./src/util/macros.lzz"
|
|
819
|
-
{
|
|
820
|
-
return v8::String::NewFromUtf8(isolate, data, v8::NewStringType::kInternalized, length).ToLocalChecked();
|
|
821
|
-
}
|
|
822
|
-
#line 26 "./src/util/macros.lzz"
|
|
823
|
-
LZZ_INLINE v8::Local <v8::Value> InternalizedFromUtf8OrNull (v8::Isolate * isolate, char const * data, int length)
|
|
824
|
-
#line 26 "./src/util/macros.lzz"
|
|
825
|
-
{
|
|
826
|
-
if (data == NULL) return v8::Null(isolate);
|
|
827
|
-
return InternalizedFromUtf8(isolate, data, length);
|
|
828
|
-
}
|
|
829
|
-
#line 30 "./src/util/macros.lzz"
|
|
830
|
-
LZZ_INLINE v8::Local <v8::String> InternalizedFromLatin1 (v8::Isolate * isolate, char const * str)
|
|
831
|
-
#line 30 "./src/util/macros.lzz"
|
|
832
|
-
{
|
|
833
|
-
return v8::String::NewFromOneByte(isolate, reinterpret_cast<const uint8_t*>(str), v8::NewStringType::kInternalized).ToLocalChecked();
|
|
834
|
-
}
|
|
835
|
-
#line 34 "./src/util/macros.lzz"
|
|
836
|
-
LZZ_INLINE void SetFrozen (v8::Isolate * isolate, v8::Local <v8::Context> ctx, v8::Local <v8::Object> obj, v8::Global <v8::String> & key, v8::Local <v8::Value> value)
|
|
837
|
-
#line 34 "./src/util/macros.lzz"
|
|
838
|
-
{
|
|
839
|
-
obj->DefineOwnProperty(ctx, key.Get(isolate), value, static_cast<v8::PropertyAttribute>(v8::DontDelete | v8::ReadOnly)).FromJust();
|
|
840
|
-
}
|
|
841
|
-
#line 92 "./src/util/macros.lzz"
|
|
842
|
-
LZZ_INLINE bool IS_SKIPPED (char c)
|
|
843
|
-
#line 92 "./src/util/macros.lzz"
|
|
844
|
-
{
|
|
845
|
-
return c == ' ' || c == ';' || (c >= '\t' && c <= '\r');
|
|
846
|
-
}
|
|
847
|
-
#line 97 "./src/util/macros.lzz"
|
|
848
|
-
template <typename T>
|
|
849
|
-
#line 97 "./src/util/macros.lzz"
|
|
850
|
-
LZZ_INLINE T * ALLOC_ARRAY (size_t count)
|
|
851
|
-
#line 97 "./src/util/macros.lzz"
|
|
852
|
-
{
|
|
853
|
-
return static_cast<T*>(::operator new[](count * sizeof(T)));
|
|
854
|
-
}
|
|
855
|
-
#line 102 "./src/util/macros.lzz"
|
|
856
|
-
template <typename T>
|
|
857
|
-
#line 102 "./src/util/macros.lzz"
|
|
858
|
-
LZZ_INLINE void FREE_ARRAY (T * array_pointer)
|
|
859
|
-
#line 102 "./src/util/macros.lzz"
|
|
860
|
-
{
|
|
861
|
-
::operator delete[](array_pointer);
|
|
862
|
-
}
|
|
863
|
-
#line 9 "./src/util/bind-map.lzz"
|
|
864
|
-
LZZ_INLINE int BindMap::Pair::GetIndex ()
|
|
865
|
-
#line 9 "./src/util/bind-map.lzz"
|
|
866
|
-
{
|
|
867
|
-
return index;
|
|
868
|
-
}
|
|
869
|
-
#line 13 "./src/util/bind-map.lzz"
|
|
870
|
-
LZZ_INLINE v8::Local <v8::String> BindMap::Pair::GetName (v8::Isolate * isolate)
|
|
871
|
-
#line 13 "./src/util/bind-map.lzz"
|
|
872
|
-
{
|
|
873
|
-
return name.Get(isolate);
|
|
874
|
-
}
|
|
875
|
-
#line 41 "./src/util/bind-map.lzz"
|
|
876
|
-
LZZ_INLINE BindMap::Pair * BindMap::GetPairs ()
|
|
877
|
-
#line 41 "./src/util/bind-map.lzz"
|
|
878
|
-
{
|
|
879
|
-
return pairs;
|
|
880
|
-
}
|
|
881
|
-
#line 45 "./src/util/bind-map.lzz"
|
|
882
|
-
LZZ_INLINE int BindMap::GetSize ()
|
|
883
|
-
#line 45 "./src/util/bind-map.lzz"
|
|
884
|
-
{
|
|
885
|
-
return length;
|
|
886
|
-
}
|
|
887
|
-
#line 77 "./src/objects/database.lzz"
|
|
888
|
-
LZZ_INLINE void Database::AddStatement (Statement * stmt)
|
|
889
|
-
#line 77 "./src/objects/database.lzz"
|
|
890
|
-
{ stmts.insert(stmts.end(), stmt);
|
|
891
|
-
}
|
|
892
|
-
#line 78 "./src/objects/database.lzz"
|
|
893
|
-
LZZ_INLINE void Database::RemoveStatement (Statement * stmt)
|
|
894
|
-
#line 78 "./src/objects/database.lzz"
|
|
895
|
-
{ stmts.erase(stmt);
|
|
896
|
-
}
|
|
897
|
-
#line 81 "./src/objects/database.lzz"
|
|
898
|
-
LZZ_INLINE void Database::AddBackup (Backup * backup)
|
|
899
|
-
#line 81 "./src/objects/database.lzz"
|
|
900
|
-
{ backups.insert(backups.end(), backup);
|
|
901
|
-
}
|
|
902
|
-
#line 82 "./src/objects/database.lzz"
|
|
903
|
-
LZZ_INLINE void Database::RemoveBackup (Backup * backup)
|
|
904
|
-
#line 82 "./src/objects/database.lzz"
|
|
905
|
-
{ backups.erase(backup);
|
|
906
|
-
}
|
|
907
|
-
#line 96 "./src/objects/database.lzz"
|
|
908
|
-
LZZ_INLINE Database::State * Database::GetState ()
|
|
909
|
-
#line 96 "./src/objects/database.lzz"
|
|
910
|
-
{
|
|
911
|
-
return reinterpret_cast<State*>(&open);
|
|
912
|
-
}
|
|
913
|
-
#line 99 "./src/objects/database.lzz"
|
|
914
|
-
LZZ_INLINE sqlite3 * Database::GetHandle ()
|
|
915
|
-
#line 99 "./src/objects/database.lzz"
|
|
916
|
-
{
|
|
917
|
-
return db_handle;
|
|
918
|
-
}
|
|
919
|
-
#line 102 "./src/objects/database.lzz"
|
|
920
|
-
LZZ_INLINE Addon * Database::GetAddon ()
|
|
921
|
-
#line 102 "./src/objects/database.lzz"
|
|
922
|
-
{
|
|
923
|
-
return addon;
|
|
924
|
-
}
|
|
925
|
-
#line 21 "./src/objects/statement.lzz"
|
|
926
|
-
LZZ_INLINE bool Statement::Compare (Statement const * const a, Statement const * const b)
|
|
927
|
-
#line 21 "./src/objects/statement.lzz"
|
|
928
|
-
{
|
|
929
|
-
return a->extras->id < b->extras->id;
|
|
930
|
-
}
|
|
931
|
-
#line 119 "./src/objects/statement-iterator.lzz"
|
|
932
|
-
LZZ_INLINE v8::Local <v8::Object> StatementIterator::NewRecord (v8::Isolate * isolate, v8::Local <v8::Context> ctx, v8::Local <v8::Value> value, Addon * addon, bool done)
|
|
933
|
-
#line 119 "./src/objects/statement-iterator.lzz"
|
|
934
|
-
{
|
|
935
|
-
v8::Local<v8::Object> record = v8::Object::New(isolate);
|
|
936
|
-
record->Set(ctx, addon->cs.value.Get(isolate), value).FromJust();
|
|
937
|
-
record->Set(ctx, addon->cs.done.Get(isolate), v8::Boolean::New(isolate, done)).FromJust();
|
|
938
|
-
return record;
|
|
939
|
-
}
|
|
940
|
-
#line 126 "./src/objects/statement-iterator.lzz"
|
|
941
|
-
LZZ_INLINE v8::Local <v8::Object> StatementIterator::DoneRecord (v8::Isolate * isolate, Addon * addon)
|
|
942
|
-
#line 126 "./src/objects/statement-iterator.lzz"
|
|
943
|
-
{
|
|
944
|
-
return NewRecord(isolate, isolate -> GetCurrentContext ( ) , v8::Undefined(isolate), addon, true);
|
|
945
|
-
}
|
|
946
|
-
#line 12 "./src/objects/backup.lzz"
|
|
947
|
-
LZZ_INLINE bool Backup::Compare (Backup const * const a, Backup const * const b)
|
|
948
|
-
#line 12 "./src/objects/backup.lzz"
|
|
949
|
-
{
|
|
950
|
-
return a->id < b->id;
|
|
951
|
-
}
|
|
952
|
-
#line 39 "./src/util/custom-aggregate.lzz"
|
|
953
|
-
LZZ_INLINE void CustomAggregate::xStepBase (sqlite3_context * invocation, int argc, sqlite3_value * * argv, v8::Global <v8::Function> const CustomAggregate::* ptrtm)
|
|
954
|
-
#line 39 "./src/util/custom-aggregate.lzz"
|
|
955
|
-
{
|
|
956
|
-
CustomAggregate * self = static_cast < CustomAggregate * > ( sqlite3_user_data ( invocation ) ) ; v8 :: Isolate * isolate = self -> isolate ; v8 :: HandleScope scope ( isolate ) ; Accumulator * acc = self -> GetAccumulator ( invocation ) ; if ( acc -> value . IsEmpty ( ) ) return ;
|
|
957
|
-
|
|
958
|
-
v8::Local<v8::Value> args_fast[5];
|
|
959
|
-
v8::Local<v8::Value>* args = argc <= 4 ? args_fast : ALLOC_ARRAY<v8::Local<v8::Value>>(argc + 1);
|
|
960
|
-
args[0] = acc->value.Get(isolate);
|
|
961
|
-
if (argc != 0) Data::GetArgumentsJS(isolate, args + 1, argv, argc, self->safe_ints);
|
|
962
|
-
|
|
963
|
-
v8::MaybeLocal<v8::Value> maybeReturnValue = (self->*ptrtm).Get(isolate)->Call( isolate -> GetCurrentContext ( ) , v8::Undefined(isolate), argc + 1, args);
|
|
964
|
-
if (args != args_fast) delete[] args;
|
|
965
|
-
|
|
966
|
-
if (maybeReturnValue.IsEmpty()) {
|
|
967
|
-
self->PropagateJSError(invocation);
|
|
968
|
-
} else {
|
|
969
|
-
v8::Local<v8::Value> returnValue = maybeReturnValue.ToLocalChecked();
|
|
970
|
-
if (!returnValue->IsUndefined()) acc->value.Reset(isolate, returnValue);
|
|
971
|
-
}
|
|
972
|
-
}
|
|
973
|
-
#line 58 "./src/util/custom-aggregate.lzz"
|
|
974
|
-
LZZ_INLINE void CustomAggregate::xValueBase (sqlite3_context * invocation, bool is_final)
|
|
975
|
-
#line 58 "./src/util/custom-aggregate.lzz"
|
|
976
|
-
{
|
|
977
|
-
CustomAggregate * self = static_cast < CustomAggregate * > ( sqlite3_user_data ( invocation ) ) ; v8 :: Isolate * isolate = self -> isolate ; v8 :: HandleScope scope ( isolate ) ; Accumulator * acc = self -> GetAccumulator ( invocation ) ; if ( acc -> value . IsEmpty ( ) ) return ;
|
|
978
|
-
|
|
979
|
-
if (!is_final) {
|
|
980
|
-
acc->is_window = true;
|
|
981
|
-
} else if (acc->is_window) {
|
|
982
|
-
DestroyAccumulator(invocation);
|
|
983
|
-
return;
|
|
984
|
-
}
|
|
985
|
-
|
|
986
|
-
v8::Local<v8::Value> result = acc->value.Get(isolate);
|
|
987
|
-
if (self->invoke_result) {
|
|
988
|
-
v8::MaybeLocal<v8::Value> maybeResult = self->result.Get(isolate)->Call( isolate -> GetCurrentContext ( ) , v8::Undefined(isolate), 1, &result);
|
|
989
|
-
if (maybeResult.IsEmpty()) {
|
|
990
|
-
self->PropagateJSError(invocation);
|
|
991
|
-
return;
|
|
992
|
-
}
|
|
993
|
-
result = maybeResult.ToLocalChecked();
|
|
994
|
-
}
|
|
995
|
-
|
|
996
|
-
Data::ResultValueFromJS(isolate, invocation, result, self);
|
|
997
|
-
if (is_final) DestroyAccumulator(invocation);
|
|
998
|
-
}
|
|
999
|
-
#line 92 "./src/util/custom-table.lzz"
|
|
1000
|
-
LZZ_INLINE CustomTable::VTab * CustomTable::VTab::Upcast (sqlite3_vtab * vtab)
|
|
1001
|
-
#line 92 "./src/util/custom-table.lzz"
|
|
1002
|
-
{
|
|
1003
|
-
return reinterpret_cast<VTab*>(vtab);
|
|
1004
|
-
}
|
|
1005
|
-
#line 96 "./src/util/custom-table.lzz"
|
|
1006
|
-
LZZ_INLINE sqlite3_vtab * CustomTable::VTab::Downcast ()
|
|
1007
|
-
#line 96 "./src/util/custom-table.lzz"
|
|
1008
|
-
{
|
|
1009
|
-
return reinterpret_cast<sqlite3_vtab*>(this);
|
|
1010
|
-
}
|
|
1011
|
-
#line 110 "./src/util/custom-table.lzz"
|
|
1012
|
-
LZZ_INLINE CustomTable::Cursor * CustomTable::Cursor::Upcast (sqlite3_vtab_cursor * cursor)
|
|
1013
|
-
#line 110 "./src/util/custom-table.lzz"
|
|
1014
|
-
{
|
|
1015
|
-
return reinterpret_cast<Cursor*>(cursor);
|
|
1016
|
-
}
|
|
1017
|
-
#line 114 "./src/util/custom-table.lzz"
|
|
1018
|
-
LZZ_INLINE sqlite3_vtab_cursor * CustomTable::Cursor::Downcast ()
|
|
1019
|
-
#line 114 "./src/util/custom-table.lzz"
|
|
1020
|
-
{
|
|
1021
|
-
return reinterpret_cast<sqlite3_vtab_cursor*>(this);
|
|
1022
|
-
}
|
|
1023
|
-
#line 118 "./src/util/custom-table.lzz"
|
|
1024
|
-
LZZ_INLINE CustomTable::VTab * CustomTable::Cursor::GetVTab ()
|
|
1025
|
-
#line 118 "./src/util/custom-table.lzz"
|
|
1026
|
-
{
|
|
1027
|
-
return VTab::Upcast(base.pVtab);
|
|
1028
|
-
}
|
|
1029
|
-
#line 52 "./src/better_sqlite3.lzz"
|
|
1030
|
-
LZZ_INLINE sqlite3_uint64 Addon::NextId ()
|
|
1031
|
-
#line 52 "./src/better_sqlite3.lzz"
|
|
1032
|
-
{
|
|
1033
|
-
return next_id++;
|
|
1034
|
-
}
|
|
1035
|
-
#undef LZZ_INLINE
|
|
1036
|
-
#endif
|