1
1
function sqlite3_open (file:: String ,handle:: Array{Ptr{Void},1} )
2
- @windows_only return ccall ( (:sqlite3_open , sqlite3_lib), stdcall,
3
- Cint, (Ptr{Uint8},Ptr{Void}),
4
- file,handle)
5
- @unix_only return ccall ( (:sqlite3_open , sqlite3_lib),
2
+ return ccall ( (:sqlite3_open , sqlite3_lib),
6
3
Cint, (Ptr{Uint8},Ptr{Void}),
7
4
file,handle)
8
5
end
9
6
function sqlite3_open16 (file:: String ,handle:: Array{Ptr{Void},1} )
10
- @windows_only return ccall ( (:sqlite3_open16 , sqlite3_lib), stdcall,
11
- Cint, (Ptr{Uint8},Ptr{Void}),
12
- file,handle)
13
- @unix_only return ccall ( (:sqlite3_open16 , sqlite3_lib),
7
+ return ccall ( (:sqlite3_open16 , sqlite3_lib),
14
8
Cint, (Ptr{Uint8},Ptr{Void}),
15
9
file,handle)
16
10
end
17
11
function sqlite3_open_v2 (file:: String ,handle:: Array{Ptr{Void},1} ,flags:: Cint ,vfs:: String )
18
- @windows_only return ccall ( (:sqlite3_open_v2 , sqlite3_lib), stdcall ,
12
+ return ccall ( (:sqlite3_open_v2 , sqlite3_lib),
19
13
Cint, (Ptr{Uint8},Ptr{Void},Cint,Ptr{Uint8}),
20
14
file,handle,flags,vfs)
21
- @unix_only return ccall ( (:sqlite3_open_v2 , sqlite3_lib),
22
- Cint, (Ptr{Uint8},Ptr{Void},Cint,Ptr{Uint8}),
23
- file,handle,flags,vfs)
24
15
end
25
16
function sqlite3_prepare (handle:: Ptr{Void} ,query:: String ,stmt:: Array{Ptr{Void},1} ,unused:: Array{Ptr{Void},1} )
26
- @windows_only return ccall ( (:sqlite3_prepare , sqlite3_lib), stdcall,
27
- Cint, (Ptr{Void},Ptr{Uint8},Cint,Ptr{Void},Ptr{Void}),
28
- handle,query,length (query),stmt,unused)
29
- @unix_only return ccall ( (:sqlite3_prepare , sqlite3_lib),
17
+ return ccall ( (:sqlite3_prepare , sqlite3_lib),
30
18
Cint, (Ptr{Void},Ptr{Uint8},Cint,Ptr{Void},Ptr{Void}),
31
19
handle,query,length (query),stmt,unused)
32
20
end
33
21
function sqlite3_prepare_v2 (handle:: Ptr{Void} ,query:: String ,stmt:: Array{Ptr{Void},1} ,unused:: Array{Ptr{Void},1} )
34
- @windows_only return ccall ( (:sqlite3_prepare_v2 , sqlite3_lib), stdcall,
35
- Cint, (Ptr{Void},Ptr{Uint8},Cint,Ptr{Void},Ptr{Void}),
36
- handle,query,length (query),stmt,unused)
37
- @unix_only return ccall ( (:sqlite3_prepare_v2 , sqlite3_lib),
22
+ return ccall ( (:sqlite3_prepare_v2 , sqlite3_lib),
38
23
Cint, (Ptr{Void},Ptr{Uint8},Cint,Ptr{Void},Ptr{Void}),
39
24
handle,query,length (query),stmt,unused)
40
25
end
41
26
function sqlite3_prepare16 (handle:: Ptr{Void} ,query:: String ,stmt:: Array{Ptr{Void},1} ,unused:: Array{Ptr{Void},1} )
42
- @windows_only return ccall ( (:sqlite3_prepare16 , sqlite3_lib), stdcall,
43
- Cint, (Ptr{Void},Ptr{Uint8},Cint,Ptr{Void},Ptr{Void}),
44
- handle,query,length (query),stmt,unused)
45
- @unix_only return ccall ( (:sqlite3_prepare16 , sqlite3_lib),
27
+ return ccall ( (:sqlite3_prepare16 , sqlite3_lib),
46
28
Cint, (Ptr{Void},Ptr{Uint8},Cint,Ptr{Void},Ptr{Void}),
47
29
handle,query,length (query),stmt,unused)
48
30
end
49
31
function sqlite3_prepare16_v2 (handle:: Ptr{Void} ,query:: String ,stmt:: Array{Ptr{Void},1} ,unused:: Array{Ptr{Void},1} )
50
- @windows_only return ccall ( (:sqlite3_prepare16_v2 , sqlite3_lib), stdcall,
51
- Cint, (Ptr{Void},Ptr{Uint8},Cint,Ptr{Void},Ptr{Void}),
52
- handle,query,length (query),stmt,unused)
53
- @unix_only return ccall ( (:sqlite3_prepare16_v2 , sqlite3_lib),
32
+ return ccall ( (:sqlite3_prepare16_v2 , sqlite3_lib),
54
33
Cint, (Ptr{Void},Ptr{Uint8},Cint,Ptr{Void},Ptr{Void}),
55
34
handle,query,length (query),stmt,unused)
56
35
end
57
36
function sqlite3_step (stmt:: Ptr{Void} )
58
- @windows_only return ccall ( (:sqlite3_step , sqlite3_lib), stdcall,
59
- Cint, (Ptr{Void},),
60
- stmt)
61
- @unix_only return ccall ( (:sqlite3_step , sqlite3_lib),
37
+ return ccall ( (:sqlite3_step , sqlite3_lib),
62
38
Cint, (Ptr{Void},),
63
39
stmt)
64
40
end
65
41
function sqlite3_column_count (stmt:: Ptr{Void} )
66
- @windows_only return ccall ( (:sqlite3_column_count , sqlite3_lib), stdcall,
67
- Cint, (Ptr{Void},),
68
- stmt)
69
- @unix_only return ccall ( (:sqlite3_column_count , sqlite3_lib),
42
+ return ccall ( (:sqlite3_column_count , sqlite3_lib),
70
43
Cint, (Ptr{Void},),
71
44
stmt)
72
45
end
73
46
function sqlite3_column_blob (stmt:: Ptr{Void} ,col:: Int )
74
- @windows_only return ccall ( (:sqlite3_column_blob , sqlite3_lib), stdcall,
75
- Ptr{Void}, (Ptr{Void},Cint),
76
- stmt,col)
77
- @unix_only return ccall ( (:sqlite3_column_blob , sqlite3_lib),
47
+ return ccall ( (:sqlite3_column_blob , sqlite3_lib),
78
48
Ptr{Void}, (Ptr{Void},Cint),
79
49
stmt,col)
80
50
end
81
51
82
52
function sqlite3_column_bytes (stmt:: Ptr{Void} ,col:: Int )
83
- @windows_only return ccall ( (:sqlite3_column_bytes , sqlite3_lib), stdcall,
84
- Cint, (Ptr{Void},Cint),
85
- stmt,col)
86
- @unix_only return ccall ( (:sqlite3_column_bytes , sqlite3_lib),
53
+ return ccall ( (:sqlite3_column_bytes , sqlite3_lib),
87
54
Cint, (Ptr{Void},Cint),
88
55
stmt,col)
89
56
end
90
57
function sqlite3_column_bytes16 (stmt:: Ptr{Void} ,col:: Int )
91
- @windows_only return ccall ( (:sqlite3_column_bytes16 , sqlite3_lib), stdcall,
92
- Cint, (Ptr{Void},Cint),
93
- stmt,col)
94
- @unix_only return ccall ( (:sqlite3_column_bytes16 , sqlite3_lib),
58
+ return ccall ( (:sqlite3_column_bytes16 , sqlite3_lib),
95
59
Cint, (Ptr{Void},Cint),
96
60
stmt,col)
97
61
end
98
62
function sqlite3_column_double (stmt:: Ptr{Void} ,col:: Int )
99
- @windows_only return ccall ( (:sqlite3_column_double , sqlite3_lib), stdcall,
100
- Cdouble, (Ptr{Void},Cint),
101
- stmt,col)
102
- @unix_only return ccall ( (:sqlite3_column_double , sqlite3_lib),
63
+ return ccall ( (:sqlite3_column_double , sqlite3_lib),
103
64
Cdouble, (Ptr{Void},Cint),
104
65
stmt,col)
105
66
end
106
67
function sqlite3_column_int (stmt:: Ptr{Void} ,col:: Int )
107
- @windows_only return ccall ( (:sqlite3_column_int , sqlite3_lib), stdcall,
108
- Cint, (Ptr{Void},Cint),
109
- stmt,col)
110
- @unix_only return ccall ( (:sqlite3_column_int , sqlite3_lib),
68
+ return ccall ( (:sqlite3_column_int , sqlite3_lib),
111
69
Cint, (Ptr{Void},Cint),
112
70
stmt,col)
113
71
end
114
72
function sqlite3_column_int64 (stmt:: Ptr{Void} ,col:: Int )
115
- @windows_only return ccall ( (:sqlite3_column_int64 , sqlite3_lib), stdcall,
116
- Clonglong, (Ptr{Void},Cint),
117
- stmt,col)
118
- @unix_only return ccall ( (:sqlite3_column_int64 , sqlite3_lib),
73
+ return ccall ( (:sqlite3_column_int64 , sqlite3_lib),
119
74
Clonglong, (Ptr{Void},Cint),
120
75
stmt,col)
121
76
end
122
77
function sqlite3_column_text (stmt:: Ptr{Void} ,col:: Int )
123
- @windows_only return ccall ( (:sqlite3_column_text , sqlite3_lib), stdcall,
124
- Ptr{Uint8}, (Ptr{Void},Cint),
125
- stmt,col)
126
- @unix_only return ccall ( (:sqlite3_column_text , sqlite3_lib),
78
+ return ccall ( (:sqlite3_column_text , sqlite3_lib),
127
79
Ptr{Uint8}, (Ptr{Void},Cint),
128
80
stmt,col)
129
81
end
130
82
function sqlite3_column_text16 (stmt:: Ptr{Void} ,col:: Int )
131
- @windows_only return ccall ( (:sqlite3_column_text16 , sqlite3_lib), stdcall,
132
- Ptr{Void}, (Ptr{Void},Cint),
133
- stmt,col)
134
- @unix_only return ccall ( (:sqlite3_column_text16 , sqlite3_lib),
83
+ return ccall ( (:sqlite3_column_text16 , sqlite3_lib),
135
84
Ptr{Void}, (Ptr{Void},Cint),
136
85
stmt,col)
137
86
end
138
87
const FUNCS = [SQLITE_INTEGER=> sqlite3_column_int,SQLITE_FLOAT=> sqlite3_column_double,SQLITE3_TEXT=> sqlite3_column_text,SQLITE_BLOB=> sqlite3_column_blob,SQLITE_NULL=> sqlite3_column_text]
139
88
function sqlite3_column_type (stmt:: Ptr{Void} ,col:: Int )
140
- @windows_only return ccall ( (:sqlite3_column_type , sqlite3_lib), stdcall,
141
- Cint, (Ptr{Void},Cint),
142
- stmt,col)
143
- @unix_only return ccall ( (:sqlite3_column_type , sqlite3_lib),
89
+ return ccall ( (:sqlite3_column_type , sqlite3_lib),
144
90
Cint, (Ptr{Void},Cint),
145
91
stmt,col)
146
92
end
147
93
# function sqlite3_column_value(stmt::Ptr{Void},col::Cint)
148
- # return ccall( (:sqlite3_column_value, sqlite3_lib), stdcall,
149
- # Ptr{Void}, (Ptr{Void},Cint),
150
- # stmt,col)
151
94
# return ccall( (:sqlite3_column_value, sqlite3_lib),
152
95
# Ptr{Void}, (Ptr{Void},Cint),
153
96
# stmt,col)
154
97
# end
155
98
# SQLITE_API sqlite3_value *sqlite3_column_value(sqlite3_stmt*, int iCol);
156
99
function sqlite3_finalize (stmt:: Ptr{Void} )
157
- @windows_only return ccall ( (:sqlite3_finalize , sqlite3_lib), stdcall,
158
- Cint, (Ptr{Void},),
159
- stmt)
160
- @unix_only return ccall ( (:sqlite3_finalize , sqlite3_lib),
100
+ return ccall ( (:sqlite3_finalize , sqlite3_lib),
161
101
Cint, (Ptr{Void},),
162
102
stmt)
163
103
end
164
104
function sqlite3_reset (stmt:: Ptr{Void} )
165
- @windows_only return ccall ( (:sqlite3_reset , sqlite3_lib), stdcall,
166
- Cint, (Ptr{Void},),
167
- stmt)
168
- @unix_only return ccall ( (:sqlite3_reset , sqlite3_lib),
105
+ return ccall ( (:sqlite3_reset , sqlite3_lib),
169
106
Cint, (Ptr{Void},),
170
107
stmt)
171
108
end
172
109
173
110
# SQLITE_API const char *sqlite3_column_name(sqlite3_stmt*, int N);
174
111
function sqlite3_column_name (stmt:: Ptr{Void} ,n:: Int )
175
- @windows_only return ccall ( (:sqlite3_column_name , sqlite3_lib), stdcall,
176
- Ptr{Uint8}, (Ptr{Void},Cint),
177
- stmt,n)
178
- @unix_only return ccall ( (:sqlite3_column_name , sqlite3_lib),
112
+ return ccall ( (:sqlite3_column_name , sqlite3_lib),
179
113
Ptr{Uint8}, (Ptr{Void},Cint),
180
114
stmt,n)
181
115
end
182
116
function sqlite3_column_name16 (stmt:: Ptr{Void} ,n:: Int )
183
- @windows_only return ccall ( (:sqlite3_column_name16 , sqlite3_lib), stdcall,
184
- Ptr{Uint8}, (Ptr{Void},Cint),
185
- stmt,n)
186
- @unix_only return ccall ( (:sqlite3_column_name16 , sqlite3_lib),
117
+ return ccall ( (:sqlite3_column_name16 , sqlite3_lib),
187
118
Ptr{Uint8}, (Ptr{Void},Cint),
188
119
stmt,n)
189
120
end
203
134
204
135
function sqlite3_close (handle:: Ptr{Void} )
205
136
try
206
- @windows_only return ccall ( (:sqlite3_close , sqlite3_lib), stdcall,
207
- Cint, (Ptr{Void},),
208
- handle)
209
- @unix_only return ccall ( (:sqlite3_close , sqlite3_lib),
137
+ return ccall ( (:sqlite3_close , sqlite3_lib),
210
138
Cint, (Ptr{Void},),
211
139
handle)
212
140
catch
@@ -215,10 +143,7 @@ function sqlite3_close(handle::Ptr{Void})
215
143
end
216
144
function sqlite3_close_v2 (handle:: Ptr{Void} )
217
145
try
218
- @windows_only return ccall ( (:sqlite3_close_v2 , sqlite3_lib), stdcall,
219
- Cint, (Ptr{Void},),
220
- handle)
221
- @unix_only return ccall ( (:sqlite3_close_v2 , sqlite3_lib),
146
+ return ccall ( (:sqlite3_close_v2 , sqlite3_lib),
222
147
Cint, (Ptr{Void},),
223
148
handle)
224
149
catch
@@ -228,42 +153,27 @@ function sqlite3_close_v2(handle::Ptr{Void})
228
153
end
229
154
end
230
155
function sqlite3_initialize ()
231
- @windows_only return ccall ( (:sqlite3_initialize , sqlite3_lib), stdcall,
232
- Cint, (),
233
- )
234
- @unix_only return ccall ( (:sqlite3_initialize , sqlite3_lib),
156
+ return ccall ( (:sqlite3_initialize , sqlite3_lib),
235
157
Cint, (),
236
158
)
237
159
end
238
160
function sqlite3_shutdown ()
239
- @windows_only return ccall ( (:sqlite3_shutdown , sqlite3_lib), stdcall,
240
- Cint, (),
241
- )
242
- @unix_only return ccall ( (:sqlite3_shutdown , sqlite3_lib),
161
+ return ccall ( (:sqlite3_shutdown , sqlite3_lib),
243
162
Cint, (),
244
163
)
245
164
end
246
165
function sqlite3_os_init ()
247
- @windows_only return ccall ( (:sqlite3_os_init , sqlite3_lib), stdcall,
248
- Cint, (),
249
- )
250
- @unix_only return ccall ( (:sqlite3_os_init , sqlite3_lib),
166
+ return ccall ( (:sqlite3_os_init , sqlite3_lib),
251
167
Cint, (),
252
168
)
253
169
end
254
170
function sqlite3_os_end ()
255
- @windows_only return ccall ( (:sqlite3_os_end , sqlite3_lib), stdcall,
256
- Cint, (),
257
- )
258
- @unix_only return ccall ( (:sqlite3_os_end , sqlite3_lib),
171
+ return ccall ( (:sqlite3_os_end , sqlite3_lib),
259
172
Cint, (),
260
173
)
261
174
end
262
175
function sqlite3_free_table (result:: Array{String,1} )
263
- @windows_only return ccall ( (:sqlite3_free_table , sqlite_lib), stdcall,
264
- Void, (Ptr{Ptr{Void}},),
265
- result)
266
- @unix_only return ccall ( (:sqlite3_free_table , sqlite_lib),
176
+ return ccall ( (:sqlite3_free_table , sqlite_lib),
267
177
Void, (Ptr{Ptr{Void}},),
268
178
result)
269
179
end
@@ -288,38 +198,26 @@ end
288
198
# SQLITE_API int sqlite3_uri_boolean(const char *zFile, const char *zParam, int bDefault);
289
199
# SQLITE_API sqlite3_int64 sqlite3_uri_int64(const char*, const char*, sqlite3_int64);
290
200
function sqlite3_errcode (db:: Ptr{Void} )
291
- @windows_only return ccall ( (:sqlite3_errcode , sqlite3_lib), stdcall,
292
- Cint, (Ptr{Void},),
293
- db)
294
- @unix_only return ccall ( (:sqlite3_errcode , sqlite3_lib),
201
+ return ccall ( (:sqlite3_errcode , sqlite3_lib),
295
202
Cint, (Ptr{Void},),
296
203
db)
297
204
end
298
205
function sqlite3_extended_errcode (db:: Ptr{Void} )
299
- @windows_only return ccall ( (:sqlite3_extended_errcode , sqlite3_lib), stdcall,
300
- Cint, (Ptr{Void},),
301
- db)
302
- @unix_only return ccall ( (:sqlite3_extended_errcode , sqlite3_lib),
206
+ return ccall ( (:sqlite3_extended_errcode , sqlite3_lib),
303
207
Cint, (Ptr{Void},),
304
208
db)
305
209
end
306
210
# SQLITE_API int sqlite3_errcode(sqlite3 *db);
307
211
# SQLITE_API int sqlite3_extended_errcode(sqlite3 *db);
308
212
# SQLITE_API const char *sqlite3_errmsg(sqlite3*);
309
213
function sqlite3_errmsg (db:: Ptr{Void} )
310
- @windows_only return ccall ( (:sqlite3_errmsg , sqlite3_lib), stdcall,
311
- Ptr{Uint8}, (Ptr{Void},),
312
- db)
313
- @unix_only return ccall ( (:sqlite3_errmsg , sqlite3_lib),
214
+ return ccall ( (:sqlite3_errmsg , sqlite3_lib),
314
215
Ptr{Uint8}, (Ptr{Void},),
315
216
db)
316
217
end
317
218
# SQLITE_API const void *sqlite3_errmsg16(sqlite3*);
318
219
function sqlite3_errstr (ret:: Cint )
319
- @windows_only return ccall ( (:sqlite3_errstr , sqlite3_lib), stdcall,
320
- Ptr{Uint8}, (Cint,),
321
- ret)
322
- @unix_only return ccall ( (:sqlite3_errstr , sqlite3_lib),
220
+ return ccall ( (:sqlite3_errstr , sqlite3_lib),
323
221
Ptr{Uint8}, (Cint,),
324
222
ret)
325
223
end
328
226
# SQLITE_API int sqlite3_limit(sqlite3*, int id, int newVal);
329
227
330
228
function sqlite3_sql (stmt:: Ptr{Void} )
331
- @windows_only return ccall ( (:sqlite3_sql , sqlite3_lib), stdcall,
332
- Void, (Ptr{Void},),
333
- stmt)
334
- @unix_only return ccall ( (:sqlite3_sql , sqlite3_lib),
229
+ return ccall ( (:sqlite3_sql , sqlite3_lib),
335
230
Void, (Ptr{Void},),
336
231
stmt)
337
232
end
@@ -343,46 +238,31 @@ end
343
238
# SQLITE_API int sqlite3_bind_blob(sqlite3_stmt*, int, const void*, int n, void(*)(void*));
344
239
# SQLITE_API int sqlite3_bind_double(sqlite3_stmt*, int, double);
345
240
function sqlite3_bind_double (stmt:: Ptr{Void} ,col:: Int ,value:: Float64 )
346
- @windows_only return ccall ( (:sqlite3_bind_double , sqlite3_lib), stdcall,
347
- Cint, (Ptr{Void},Cint,Float64),
348
- stmt,col,value)
349
- @unix_only return ccall ( (:sqlite3_bind_double , sqlite3_lib),
241
+ return ccall ( (:sqlite3_bind_double , sqlite3_lib),
350
242
Cint, (Ptr{Void},Cint,Float64),
351
243
stmt,col,value)
352
244
end
353
245
# SQLITE_API int sqlite3_bind_int(sqlite3_stmt*, int, int);
354
246
function sqlite3_bind_int (stmt:: Ptr{Void} ,col:: Int ,value:: Int32 )
355
- @windows_only return ccall ( (:sqlite3_bind_int , sqlite3_lib), stdcall,
356
- Cint, (Ptr{Void},Cint,Int32),
357
- stmt,col,value)
358
- @unix_only return ccall ( (:sqlite3_bind_int , sqlite3_lib),
247
+ return ccall ( (:sqlite3_bind_int , sqlite3_lib),
359
248
Cint, (Ptr{Void},Cint,Int32),
360
249
stmt,col,value)
361
250
end
362
251
# SQLITE_API int sqlite3_bind_int64(sqlite3_stmt*, int, sqlite3_int64);
363
252
function sqlite3_bind_int64 (stmt:: Ptr{Void} ,col:: Int ,value:: Int64 )
364
- @windows_only return ccall ( (:sqlite3_bind_int64 , sqlite3_lib), stdcall,
365
- Cint, (Ptr{Void},Cint,Int64),
366
- stmt,col,value)
367
- @unix_only return ccall ( (:sqlite3_bind_int64 , sqlite3_lib),
253
+ return ccall ( (:sqlite3_bind_int64 , sqlite3_lib),
368
254
Cint, (Ptr{Void},Cint,Int64),
369
255
stmt,col,value)
370
256
end
371
257
# SQLITE_API int sqlite3_bind_null(sqlite3_stmt*, int);
372
258
function sqlite3_bind_null (stmt:: Ptr{Void} ,col:: Int )
373
- @windows_only return ccall ( (:sqlite3_bind_null , sqlite3_lib), stdcall,
374
- Cint, (Ptr{Void},Cint),
375
- stmt,col)
376
- @unix_only return ccall ( (:sqlite3_bind_null , sqlite3_lib),
259
+ return ccall ( (:sqlite3_bind_null , sqlite3_lib),
377
260
Cint, (Ptr{Void},Cint),
378
261
stmt,col)
379
262
end
380
263
# SQLITE_API int sqlite3_bind_text(sqlite3_stmt*, int, const char*, int n, void(*)(void*));
381
264
function sqlite3_bind_text (stmt:: Ptr{Void} ,col:: Int ,value:: String ,len:: Int ,cb:: Ptr{Void} )
382
- @windows_only return ccall ( (:sqlite3_bind_text , sqlite3_lib), stdcall,
383
- Cint, (Ptr{Void},Cint,Ptr{Uint8},Cint,Ptr{Void}),
384
- stmt,col,value,len,cb)
385
- @unix_only return ccall ( (:sqlite3_bind_text , sqlite3_lib),
265
+ return ccall ( (:sqlite3_bind_text , sqlite3_lib),
386
266
Cint, (Ptr{Void},Cint,Ptr{Uint8},Cint,Ptr{Void}),
387
267
stmt,col,value,len,cb)
388
268
end
0 commit comments