line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
#define PERL_NO_GET_CONTEXT |
2
|
|
|
|
|
|
|
|
3
|
|
|
|
|
|
|
#include "SQLiteXS.h" |
4
|
|
|
|
|
|
|
|
5
|
232
|
50
|
|
|
|
|
DBISTATE_DECLARE; |
|
|
50
|
|
|
|
|
|
6
|
|
|
|
|
|
|
|
7
|
|
|
|
|
|
|
MODULE = DBD::SQLite PACKAGE = DBD::SQLite::db |
8
|
|
|
|
|
|
|
|
9
|
|
|
|
|
|
|
PROTOTYPES: DISABLE |
10
|
|
|
|
|
|
|
|
11
|
|
|
|
|
|
|
BOOT: |
12
|
116
|
|
|
|
|
|
init_cxt(); |
13
|
116
|
|
|
|
|
|
sv_setpv(get_sv("DBD::SQLite::sqlite_version", TRUE|GV_ADDMULTI), SQLITE_VERSION); |
14
|
116
|
|
|
|
|
|
sv_setiv(get_sv("DBD::SQLite::sqlite_version_number", TRUE|GV_ADDMULTI), SQLITE_VERSION_NUMBER); |
15
|
|
|
|
|
|
|
|
16
|
|
|
|
|
|
|
void |
17
|
|
|
|
|
|
|
_do(dbh, statement) |
18
|
|
|
|
|
|
|
SV *dbh |
19
|
|
|
|
|
|
|
SV *statement |
20
|
|
|
|
|
|
|
CODE: |
21
|
|
|
|
|
|
|
{ |
22
|
2847
|
|
|
|
|
|
D_imp_dbh(dbh); |
23
|
|
|
|
|
|
|
IV retval; |
24
|
2847
|
|
|
|
|
|
retval = sqlite_db_do_sv(dbh, imp_dbh, statement); |
25
|
|
|
|
|
|
|
/* remember that dbd_db_do_sv must return <= -2 for error */ |
26
|
2847
|
100
|
|
|
|
|
if (retval == 0) /* ok with no rows affected */ |
27
|
246
|
|
|
|
|
|
XST_mPV(0, "0E0"); /* (true but zero) */ |
28
|
2601
|
100
|
|
|
|
|
else if (retval < -1) /* -1 == unknown number of rows */ |
29
|
38
|
|
|
|
|
|
XST_mUNDEF(0); /* <= -2 means error */ |
30
|
|
|
|
|
|
|
else |
31
|
2563
|
|
|
|
|
|
XST_mIV(0, retval); /* typically 1, rowcount or -1 */ |
32
|
|
|
|
|
|
|
} |
33
|
|
|
|
|
|
|
|
34
|
|
|
|
|
|
|
IV |
35
|
|
|
|
|
|
|
last_insert_rowid(dbh) |
36
|
|
|
|
|
|
|
SV *dbh |
37
|
|
|
|
|
|
|
ALIAS: |
38
|
|
|
|
|
|
|
DBD::SQLite::db::sqlite_last_insert_rowid = 1 |
39
|
|
|
|
|
|
|
CODE: |
40
|
|
|
|
|
|
|
{ |
41
|
2
|
|
|
|
|
|
D_imp_dbh(dbh); |
42
|
2
|
|
|
|
|
|
RETVAL = (IV)sqlite3_last_insert_rowid(imp_dbh->db); |
43
|
|
|
|
|
|
|
} |
44
|
|
|
|
|
|
|
OUTPUT: |
45
|
|
|
|
|
|
|
RETVAL |
46
|
|
|
|
|
|
|
|
47
|
|
|
|
|
|
|
static int |
48
|
|
|
|
|
|
|
create_function(dbh, name, argc, func, flags = 0) |
49
|
|
|
|
|
|
|
SV *dbh |
50
|
|
|
|
|
|
|
char *name |
51
|
|
|
|
|
|
|
int argc |
52
|
|
|
|
|
|
|
SV *func |
53
|
|
|
|
|
|
|
int flags |
54
|
|
|
|
|
|
|
ALIAS: |
55
|
|
|
|
|
|
|
DBD::SQLite::db::sqlite_create_function = 1 |
56
|
|
|
|
|
|
|
CODE: |
57
|
|
|
|
|
|
|
{ |
58
|
385
|
|
|
|
|
|
RETVAL = sqlite_db_create_function(aTHX_ dbh, name, argc, func, flags ); |
59
|
|
|
|
|
|
|
} |
60
|
|
|
|
|
|
|
OUTPUT: |
61
|
|
|
|
|
|
|
RETVAL |
62
|
|
|
|
|
|
|
|
63
|
|
|
|
|
|
|
#ifndef SQLITE_OMIT_LOAD_EXTENSION |
64
|
|
|
|
|
|
|
|
65
|
|
|
|
|
|
|
static int |
66
|
|
|
|
|
|
|
enable_load_extension(dbh, onoff) |
67
|
|
|
|
|
|
|
SV *dbh |
68
|
|
|
|
|
|
|
int onoff |
69
|
|
|
|
|
|
|
ALIAS: |
70
|
|
|
|
|
|
|
DBD::SQLite::db::sqlite_enable_load_extension = 1 |
71
|
|
|
|
|
|
|
CODE: |
72
|
|
|
|
|
|
|
{ |
73
|
4
|
|
|
|
|
|
RETVAL = sqlite_db_enable_load_extension(aTHX_ dbh, onoff ); |
74
|
|
|
|
|
|
|
} |
75
|
|
|
|
|
|
|
OUTPUT: |
76
|
|
|
|
|
|
|
RETVAL |
77
|
|
|
|
|
|
|
|
78
|
|
|
|
|
|
|
static int |
79
|
|
|
|
|
|
|
load_extension(dbh, file, proc = 0) |
80
|
|
|
|
|
|
|
SV *dbh |
81
|
|
|
|
|
|
|
const char *file |
82
|
|
|
|
|
|
|
const char *proc |
83
|
|
|
|
|
|
|
ALIAS: |
84
|
|
|
|
|
|
|
DBD::SQLite::db::sqlite_load_extension = 1 |
85
|
|
|
|
|
|
|
CODE: |
86
|
|
|
|
|
|
|
{ |
87
|
0
|
|
|
|
|
|
RETVAL = sqlite_db_load_extension(aTHX_ dbh, file, proc); |
88
|
|
|
|
|
|
|
} |
89
|
|
|
|
|
|
|
OUTPUT: |
90
|
|
|
|
|
|
|
RETVAL |
91
|
|
|
|
|
|
|
|
92
|
|
|
|
|
|
|
#endif |
93
|
|
|
|
|
|
|
|
94
|
|
|
|
|
|
|
static int |
95
|
|
|
|
|
|
|
create_aggregate(dbh, name, argc, aggr, flags = 0) |
96
|
|
|
|
|
|
|
SV *dbh |
97
|
|
|
|
|
|
|
char *name |
98
|
|
|
|
|
|
|
int argc |
99
|
|
|
|
|
|
|
SV *aggr |
100
|
|
|
|
|
|
|
int flags |
101
|
|
|
|
|
|
|
ALIAS: |
102
|
|
|
|
|
|
|
DBD::SQLite::db::sqlite_create_aggregate = 1 |
103
|
|
|
|
|
|
|
CODE: |
104
|
|
|
|
|
|
|
{ |
105
|
46
|
|
|
|
|
|
RETVAL = sqlite_db_create_aggregate(aTHX_ dbh, name, argc, aggr, flags ); |
106
|
|
|
|
|
|
|
} |
107
|
|
|
|
|
|
|
OUTPUT: |
108
|
|
|
|
|
|
|
RETVAL |
109
|
|
|
|
|
|
|
|
110
|
|
|
|
|
|
|
static int |
111
|
|
|
|
|
|
|
create_collation(dbh, name, func) |
112
|
|
|
|
|
|
|
SV *dbh |
113
|
|
|
|
|
|
|
char *name |
114
|
|
|
|
|
|
|
SV *func |
115
|
|
|
|
|
|
|
ALIAS: |
116
|
|
|
|
|
|
|
DBD::SQLite::db::sqlite_create_collation = 1 |
117
|
|
|
|
|
|
|
CODE: |
118
|
|
|
|
|
|
|
{ |
119
|
24
|
|
|
|
|
|
RETVAL = sqlite_db_create_collation(aTHX_ dbh, name, func ); |
120
|
|
|
|
|
|
|
} |
121
|
|
|
|
|
|
|
OUTPUT: |
122
|
|
|
|
|
|
|
RETVAL |
123
|
|
|
|
|
|
|
|
124
|
|
|
|
|
|
|
|
125
|
|
|
|
|
|
|
static void |
126
|
|
|
|
|
|
|
collation_needed(dbh, callback) |
127
|
|
|
|
|
|
|
SV *dbh |
128
|
|
|
|
|
|
|
SV *callback |
129
|
|
|
|
|
|
|
ALIAS: |
130
|
|
|
|
|
|
|
DBD::SQLite::db::sqlite_collation_needed = 1 |
131
|
|
|
|
|
|
|
CODE: |
132
|
|
|
|
|
|
|
{ |
133
|
311
|
|
|
|
|
|
sqlite_db_collation_needed(aTHX_ dbh, callback ); |
134
|
|
|
|
|
|
|
} |
135
|
|
|
|
|
|
|
|
136
|
|
|
|
|
|
|
|
137
|
|
|
|
|
|
|
static int |
138
|
|
|
|
|
|
|
progress_handler(dbh, n_opcodes, handler) |
139
|
|
|
|
|
|
|
SV *dbh |
140
|
|
|
|
|
|
|
int n_opcodes |
141
|
|
|
|
|
|
|
SV *handler |
142
|
|
|
|
|
|
|
ALIAS: |
143
|
|
|
|
|
|
|
DBD::SQLite::db::sqlite_progress_handler = 1 |
144
|
|
|
|
|
|
|
CODE: |
145
|
|
|
|
|
|
|
{ |
146
|
8
|
|
|
|
|
|
RETVAL = sqlite_db_progress_handler(aTHX_ dbh, n_opcodes, handler ); |
147
|
|
|
|
|
|
|
} |
148
|
|
|
|
|
|
|
OUTPUT: |
149
|
|
|
|
|
|
|
RETVAL |
150
|
|
|
|
|
|
|
|
151
|
|
|
|
|
|
|
static int |
152
|
|
|
|
|
|
|
sqlite_trace(dbh, callback) |
153
|
|
|
|
|
|
|
SV *dbh |
154
|
|
|
|
|
|
|
SV *callback |
155
|
|
|
|
|
|
|
CODE: |
156
|
|
|
|
|
|
|
{ |
157
|
6
|
|
|
|
|
|
RETVAL = sqlite_db_trace(aTHX_ dbh, callback ); |
158
|
|
|
|
|
|
|
} |
159
|
|
|
|
|
|
|
OUTPUT: |
160
|
|
|
|
|
|
|
RETVAL |
161
|
|
|
|
|
|
|
|
162
|
|
|
|
|
|
|
static int |
163
|
|
|
|
|
|
|
profile(dbh, callback) |
164
|
|
|
|
|
|
|
SV *dbh |
165
|
|
|
|
|
|
|
SV *callback |
166
|
|
|
|
|
|
|
ALIAS: |
167
|
|
|
|
|
|
|
DBD::SQLite::db::sqlite_profile = 1 |
168
|
|
|
|
|
|
|
CODE: |
169
|
|
|
|
|
|
|
{ |
170
|
6
|
|
|
|
|
|
RETVAL = sqlite_db_profile(aTHX_ dbh, callback ); |
171
|
|
|
|
|
|
|
} |
172
|
|
|
|
|
|
|
OUTPUT: |
173
|
|
|
|
|
|
|
RETVAL |
174
|
|
|
|
|
|
|
|
175
|
|
|
|
|
|
|
SV* |
176
|
|
|
|
|
|
|
commit_hook(dbh, hook) |
177
|
|
|
|
|
|
|
SV *dbh |
178
|
|
|
|
|
|
|
SV *hook |
179
|
|
|
|
|
|
|
ALIAS: |
180
|
|
|
|
|
|
|
DBD::SQLite::db::sqlite_commit_hook = 1 |
181
|
|
|
|
|
|
|
CODE: |
182
|
|
|
|
|
|
|
{ |
183
|
12
|
|
|
|
|
|
RETVAL = (SV*) sqlite_db_commit_hook( aTHX_ dbh, hook ); |
184
|
|
|
|
|
|
|
} |
185
|
|
|
|
|
|
|
OUTPUT: |
186
|
|
|
|
|
|
|
RETVAL |
187
|
|
|
|
|
|
|
|
188
|
|
|
|
|
|
|
SV* |
189
|
|
|
|
|
|
|
rollback_hook(dbh, hook) |
190
|
|
|
|
|
|
|
SV *dbh |
191
|
|
|
|
|
|
|
SV *hook |
192
|
|
|
|
|
|
|
ALIAS: |
193
|
|
|
|
|
|
|
DBD::SQLite::db::sqlite_rollback_hook = 1 |
194
|
|
|
|
|
|
|
CODE: |
195
|
|
|
|
|
|
|
{ |
196
|
8
|
|
|
|
|
|
RETVAL = (SV*) sqlite_db_rollback_hook( aTHX_ dbh, hook ); |
197
|
|
|
|
|
|
|
} |
198
|
|
|
|
|
|
|
OUTPUT: |
199
|
|
|
|
|
|
|
RETVAL |
200
|
|
|
|
|
|
|
|
201
|
|
|
|
|
|
|
SV* |
202
|
|
|
|
|
|
|
update_hook(dbh, hook) |
203
|
|
|
|
|
|
|
SV *dbh |
204
|
|
|
|
|
|
|
SV *hook |
205
|
|
|
|
|
|
|
ALIAS: |
206
|
|
|
|
|
|
|
DBD::SQLite::db::sqlite_update_hook = 1 |
207
|
|
|
|
|
|
|
CODE: |
208
|
|
|
|
|
|
|
{ |
209
|
8
|
|
|
|
|
|
RETVAL = (SV*) sqlite_db_update_hook( aTHX_ dbh, hook ); |
210
|
|
|
|
|
|
|
} |
211
|
|
|
|
|
|
|
OUTPUT: |
212
|
|
|
|
|
|
|
RETVAL |
213
|
|
|
|
|
|
|
|
214
|
|
|
|
|
|
|
|
215
|
|
|
|
|
|
|
static int |
216
|
|
|
|
|
|
|
set_authorizer(dbh, authorizer) |
217
|
|
|
|
|
|
|
SV *dbh |
218
|
|
|
|
|
|
|
SV *authorizer |
219
|
|
|
|
|
|
|
ALIAS: |
220
|
|
|
|
|
|
|
DBD::SQLite::db::sqlite_set_authorizer = 1 |
221
|
|
|
|
|
|
|
CODE: |
222
|
|
|
|
|
|
|
{ |
223
|
8
|
|
|
|
|
|
RETVAL = sqlite_db_set_authorizer( aTHX_ dbh, authorizer ); |
224
|
|
|
|
|
|
|
} |
225
|
|
|
|
|
|
|
OUTPUT: |
226
|
|
|
|
|
|
|
RETVAL |
227
|
|
|
|
|
|
|
|
228
|
|
|
|
|
|
|
|
229
|
|
|
|
|
|
|
int |
230
|
|
|
|
|
|
|
busy_timeout(dbh, timeout=NULL) |
231
|
|
|
|
|
|
|
SV *dbh |
232
|
|
|
|
|
|
|
SV *timeout |
233
|
|
|
|
|
|
|
ALIAS: |
234
|
|
|
|
|
|
|
DBD::SQLite::db::sqlite_busy_timeout = 1 |
235
|
|
|
|
|
|
|
CODE: |
236
|
26
|
|
|
|
|
|
RETVAL = sqlite_db_busy_timeout(aTHX_ dbh, timeout ); |
237
|
|
|
|
|
|
|
OUTPUT: |
238
|
|
|
|
|
|
|
RETVAL |
239
|
|
|
|
|
|
|
|
240
|
|
|
|
|
|
|
static int |
241
|
|
|
|
|
|
|
backup_from_file(dbh, filename) |
242
|
|
|
|
|
|
|
SV *dbh |
243
|
|
|
|
|
|
|
char *filename |
244
|
|
|
|
|
|
|
ALIAS: |
245
|
|
|
|
|
|
|
DBD::SQLite::db::sqlite_backup_from_file = 1 |
246
|
|
|
|
|
|
|
CODE: |
247
|
6
|
|
|
|
|
|
RETVAL = sqlite_db_backup_from_file(aTHX_ dbh, filename); |
248
|
|
|
|
|
|
|
OUTPUT: |
249
|
|
|
|
|
|
|
RETVAL |
250
|
|
|
|
|
|
|
|
251
|
|
|
|
|
|
|
static int |
252
|
|
|
|
|
|
|
backup_to_file(dbh, filename) |
253
|
|
|
|
|
|
|
SV *dbh |
254
|
|
|
|
|
|
|
char *filename |
255
|
|
|
|
|
|
|
ALIAS: |
256
|
|
|
|
|
|
|
DBD::SQLite::db::sqlite_backup_to_file = 1 |
257
|
|
|
|
|
|
|
CODE: |
258
|
6
|
|
|
|
|
|
RETVAL = sqlite_db_backup_to_file(aTHX_ dbh, filename); |
259
|
|
|
|
|
|
|
OUTPUT: |
260
|
|
|
|
|
|
|
RETVAL |
261
|
|
|
|
|
|
|
|
262
|
|
|
|
|
|
|
static int |
263
|
|
|
|
|
|
|
backup_from_dbh(dbh, from) |
264
|
|
|
|
|
|
|
SV *dbh |
265
|
|
|
|
|
|
|
SV *from |
266
|
|
|
|
|
|
|
ALIAS: |
267
|
|
|
|
|
|
|
DBD::SQLite::db::sqlite_backup_from_dbh = 1 |
268
|
|
|
|
|
|
|
CODE: |
269
|
2
|
|
|
|
|
|
RETVAL = sqlite_db_backup_from_dbh(aTHX_ dbh, from); |
270
|
|
|
|
|
|
|
OUTPUT: |
271
|
|
|
|
|
|
|
RETVAL |
272
|
|
|
|
|
|
|
|
273
|
|
|
|
|
|
|
static int |
274
|
|
|
|
|
|
|
backup_to_dbh(dbh, to) |
275
|
|
|
|
|
|
|
SV *dbh |
276
|
|
|
|
|
|
|
SV *to |
277
|
|
|
|
|
|
|
ALIAS: |
278
|
|
|
|
|
|
|
DBD::SQLite::db::sqlite_backup_to_dbh = 1 |
279
|
|
|
|
|
|
|
CODE: |
280
|
2
|
|
|
|
|
|
RETVAL = sqlite_db_backup_to_dbh(aTHX_ dbh, to); |
281
|
|
|
|
|
|
|
OUTPUT: |
282
|
|
|
|
|
|
|
RETVAL |
283
|
|
|
|
|
|
|
|
284
|
|
|
|
|
|
|
HV* |
285
|
|
|
|
|
|
|
table_column_metadata(dbh, dbname, tablename, columnname) |
286
|
|
|
|
|
|
|
SV* dbh |
287
|
|
|
|
|
|
|
SV* dbname |
288
|
|
|
|
|
|
|
SV* tablename |
289
|
|
|
|
|
|
|
SV* columnname |
290
|
|
|
|
|
|
|
ALIAS: |
291
|
|
|
|
|
|
|
DBD::SQLite::db::sqlite_table_column_metadata = 1 |
292
|
|
|
|
|
|
|
CODE: |
293
|
14
|
|
|
|
|
|
RETVAL = sqlite_db_table_column_metadata(aTHX_ dbh, dbname, tablename, columnname); |
294
|
|
|
|
|
|
|
OUTPUT: |
295
|
|
|
|
|
|
|
RETVAL |
296
|
|
|
|
|
|
|
|
297
|
|
|
|
|
|
|
SV* |
298
|
|
|
|
|
|
|
db_filename(dbh) |
299
|
|
|
|
|
|
|
SV* dbh |
300
|
|
|
|
|
|
|
ALIAS: |
301
|
|
|
|
|
|
|
DBD::SQLite::db::sqlite_db_filename = 1 |
302
|
|
|
|
|
|
|
CODE: |
303
|
11
|
|
|
|
|
|
RETVAL = sqlite_db_filename(aTHX_ dbh); |
304
|
|
|
|
|
|
|
OUTPUT: |
305
|
|
|
|
|
|
|
RETVAL |
306
|
|
|
|
|
|
|
|
307
|
|
|
|
|
|
|
static int |
308
|
|
|
|
|
|
|
register_fts3_perl_tokenizer(dbh) |
309
|
|
|
|
|
|
|
SV *dbh |
310
|
|
|
|
|
|
|
ALIAS: |
311
|
|
|
|
|
|
|
DBD::SQLite::db::sqlite_register_fts3_perl_tokenizer = 1 |
312
|
|
|
|
|
|
|
CODE: |
313
|
307
|
|
|
|
|
|
RETVAL = sqlite_db_register_fts3_perl_tokenizer(aTHX_ dbh); |
314
|
|
|
|
|
|
|
OUTPUT: |
315
|
|
|
|
|
|
|
RETVAL |
316
|
|
|
|
|
|
|
|
317
|
|
|
|
|
|
|
HV* |
318
|
|
|
|
|
|
|
db_status(dbh, reset = 0) |
319
|
|
|
|
|
|
|
SV* dbh |
320
|
|
|
|
|
|
|
int reset |
321
|
|
|
|
|
|
|
ALIAS: |
322
|
|
|
|
|
|
|
DBD::SQLite::db::sqlite_db_status = 1 |
323
|
|
|
|
|
|
|
CODE: |
324
|
2
|
|
|
|
|
|
RETVAL = (HV*)_sqlite_db_status(aTHX_ dbh, reset); |
325
|
|
|
|
|
|
|
OUTPUT: |
326
|
|
|
|
|
|
|
RETVAL |
327
|
|
|
|
|
|
|
|
328
|
|
|
|
|
|
|
|
329
|
|
|
|
|
|
|
static int |
330
|
|
|
|
|
|
|
create_module(dbh, name, perl_class) |
331
|
|
|
|
|
|
|
SV *dbh |
332
|
|
|
|
|
|
|
char *name |
333
|
|
|
|
|
|
|
char *perl_class |
334
|
|
|
|
|
|
|
ALIAS: |
335
|
|
|
|
|
|
|
DBD::SQLite::db::sqlite_create_module = 1 |
336
|
|
|
|
|
|
|
CODE: |
337
|
|
|
|
|
|
|
{ |
338
|
13
|
|
|
|
|
|
RETVAL = sqlite_db_create_module(aTHX_ dbh, name, perl_class); |
339
|
|
|
|
|
|
|
} |
340
|
|
|
|
|
|
|
OUTPUT: |
341
|
|
|
|
|
|
|
RETVAL |
342
|
|
|
|
|
|
|
|
343
|
|
|
|
|
|
|
static int |
344
|
|
|
|
|
|
|
limit(dbh, id, new_value = -1) |
345
|
|
|
|
|
|
|
SV *dbh |
346
|
|
|
|
|
|
|
int id |
347
|
|
|
|
|
|
|
int new_value |
348
|
|
|
|
|
|
|
ALIAS: |
349
|
|
|
|
|
|
|
DBD::SQLite::db::sqlite_limit = 1 |
350
|
|
|
|
|
|
|
CODE: |
351
|
|
|
|
|
|
|
{ |
352
|
6
|
|
|
|
|
|
RETVAL = sqlite_db_limit(aTHX_ dbh, id, new_value); |
353
|
|
|
|
|
|
|
} |
354
|
|
|
|
|
|
|
OUTPUT: |
355
|
|
|
|
|
|
|
RETVAL |
356
|
|
|
|
|
|
|
|
357
|
|
|
|
|
|
|
static int |
358
|
|
|
|
|
|
|
db_config(dbh, id, new_value = -1) |
359
|
|
|
|
|
|
|
SV *dbh |
360
|
|
|
|
|
|
|
int id |
361
|
|
|
|
|
|
|
int new_value |
362
|
|
|
|
|
|
|
ALIAS: |
363
|
|
|
|
|
|
|
DBD::SQLite::db::sqlite_db_config = 1 |
364
|
|
|
|
|
|
|
CODE: |
365
|
|
|
|
|
|
|
{ |
366
|
90
|
|
|
|
|
|
RETVAL = sqlite_db_config(aTHX_ dbh, id, new_value); |
367
|
|
|
|
|
|
|
} |
368
|
|
|
|
|
|
|
OUTPUT: |
369
|
|
|
|
|
|
|
RETVAL |
370
|
|
|
|
|
|
|
|
371
|
|
|
|
|
|
|
static int |
372
|
|
|
|
|
|
|
get_autocommit(dbh) |
373
|
|
|
|
|
|
|
SV *dbh |
374
|
|
|
|
|
|
|
ALIAS: |
375
|
|
|
|
|
|
|
DBD::SQLite::db::sqlite_get_autocommit = 1 |
376
|
|
|
|
|
|
|
CODE: |
377
|
|
|
|
|
|
|
{ |
378
|
14
|
|
|
|
|
|
RETVAL = sqlite_db_get_autocommit(aTHX_ dbh); |
379
|
|
|
|
|
|
|
} |
380
|
|
|
|
|
|
|
OUTPUT: |
381
|
|
|
|
|
|
|
RETVAL |
382
|
|
|
|
|
|
|
|
383
|
|
|
|
|
|
|
static int |
384
|
|
|
|
|
|
|
txn_state(SV* dbh, SV *schema = &PL_sv_undef) |
385
|
|
|
|
|
|
|
ALIAS: |
386
|
|
|
|
|
|
|
DBD::SQLite::db::sqlite_txn_state = 1 |
387
|
|
|
|
|
|
|
CODE: |
388
|
|
|
|
|
|
|
{ |
389
|
0
|
|
|
|
|
|
RETVAL = sqlite_db_txn_state(aTHX_ dbh, schema); |
390
|
|
|
|
|
|
|
} |
391
|
|
|
|
|
|
|
OUTPUT: |
392
|
|
|
|
|
|
|
RETVAL |
393
|
|
|
|
|
|
|
|
394
|
|
|
|
|
|
|
static int |
395
|
|
|
|
|
|
|
error_offset(dbh) |
396
|
|
|
|
|
|
|
SV *dbh |
397
|
|
|
|
|
|
|
ALIAS: |
398
|
|
|
|
|
|
|
DBD::SQLite::db::sqlite_error_offset = 1 |
399
|
|
|
|
|
|
|
CODE: |
400
|
|
|
|
|
|
|
{ |
401
|
|
|
|
|
|
|
#if SQLITE_VERSION_NUMBER >= 3038000 |
402
|
1
|
|
|
|
|
|
D_imp_dbh(dbh); |
403
|
1
|
|
|
|
|
|
RETVAL = sqlite3_error_offset(imp_dbh->db); |
404
|
|
|
|
|
|
|
#else |
405
|
|
|
|
|
|
|
RETVAL = -1; |
406
|
|
|
|
|
|
|
#endif |
407
|
|
|
|
|
|
|
} |
408
|
|
|
|
|
|
|
OUTPUT: |
409
|
|
|
|
|
|
|
RETVAL |
410
|
|
|
|
|
|
|
|
411
|
|
|
|
|
|
|
|
412
|
|
|
|
|
|
|
MODULE = DBD::SQLite PACKAGE = DBD::SQLite::st |
413
|
|
|
|
|
|
|
|
414
|
|
|
|
|
|
|
PROTOTYPES: DISABLE |
415
|
|
|
|
|
|
|
|
416
|
|
|
|
|
|
|
HV* |
417
|
|
|
|
|
|
|
st_status(sth, reset = 0) |
418
|
|
|
|
|
|
|
SV* sth |
419
|
|
|
|
|
|
|
int reset |
420
|
|
|
|
|
|
|
ALIAS: |
421
|
|
|
|
|
|
|
DBD::SQLite::st::sqlite_st_status = 1 |
422
|
|
|
|
|
|
|
CODE: |
423
|
2
|
|
|
|
|
|
RETVAL = (HV*)_sqlite_st_status(aTHX_ sth, reset); |
424
|
|
|
|
|
|
|
OUTPUT: |
425
|
|
|
|
|
|
|
RETVAL |
426
|
|
|
|
|
|
|
|
427
|
|
|
|
|
|
|
MODULE = DBD::SQLite PACKAGE = DBD::SQLite |
428
|
|
|
|
|
|
|
|
429
|
|
|
|
|
|
|
# a couple of constants exported from sqlite3.h |
430
|
|
|
|
|
|
|
|
431
|
|
|
|
|
|
|
PROTOTYPES: DISABLE |
432
|
|
|
|
|
|
|
|
433
|
|
|
|
|
|
|
static int |
434
|
|
|
|
|
|
|
compile_options() |
435
|
|
|
|
|
|
|
CODE: |
436
|
16
|
|
|
|
|
|
int n = 0; |
437
|
16
|
|
|
|
|
|
AV* av = (AV*)sqlite_compile_options(); |
438
|
16
|
50
|
|
|
|
|
if (av) { |
439
|
|
|
|
|
|
|
int i; |
440
|
16
|
|
|
|
|
|
n = av_len(av) + 1; |
441
|
16
|
50
|
|
|
|
|
EXTEND(sp, n); |
|
|
50
|
|
|
|
|
|
442
|
704
|
100
|
|
|
|
|
for (i = 0; i < n; i++) { |
443
|
688
|
|
|
|
|
|
PUSHs(AvARRAY(av)[i]); |
444
|
|
|
|
|
|
|
} |
445
|
|
|
|
|
|
|
} |
446
|
16
|
|
|
|
|
|
XSRETURN(n); |
447
|
|
|
|
|
|
|
|
448
|
|
|
|
|
|
|
HV* |
449
|
|
|
|
|
|
|
sqlite_status(reset = 0) |
450
|
|
|
|
|
|
|
int reset |
451
|
|
|
|
|
|
|
CODE: |
452
|
1
|
|
|
|
|
|
RETVAL = (HV*)_sqlite_status(reset); |
453
|
|
|
|
|
|
|
OUTPUT: |
454
|
|
|
|
|
|
|
RETVAL |
455
|
|
|
|
|
|
|
|
456
|
|
|
|
|
|
|
#if SQLITE_VERSION_NUMBER >= 3010000 |
457
|
|
|
|
|
|
|
|
458
|
|
|
|
|
|
|
int |
459
|
|
|
|
|
|
|
strglob(const char *zglob, const char *zstr) |
460
|
|
|
|
|
|
|
CODE: |
461
|
0
|
|
|
|
|
|
RETVAL = sqlite3_strglob(zglob, zstr); |
462
|
|
|
|
|
|
|
OUTPUT: |
463
|
|
|
|
|
|
|
RETVAL |
464
|
|
|
|
|
|
|
|
465
|
|
|
|
|
|
|
int |
466
|
|
|
|
|
|
|
strlike(const char *zglob, const char *zstr, const char *esc = NULL) |
467
|
|
|
|
|
|
|
CODE: |
468
|
129
|
100
|
|
|
|
|
if (esc) { |
469
|
8
|
|
|
|
|
|
RETVAL = sqlite3_strlike(zglob, zstr, (unsigned int)(*esc)); |
470
|
|
|
|
|
|
|
} else { |
471
|
121
|
|
|
|
|
|
RETVAL = sqlite3_strlike(zglob, zstr, 0); |
472
|
|
|
|
|
|
|
} |
473
|
|
|
|
|
|
|
OUTPUT: |
474
|
|
|
|
|
|
|
RETVAL |
475
|
|
|
|
|
|
|
|
476
|
|
|
|
|
|
|
#endif |
477
|
|
|
|
|
|
|
|
478
|
|
|
|
|
|
|
INCLUDE: constants.inc |
479
|
|
|
|
|
|
|
INCLUDE: SQLite.xsi |