Debian Codegraph @

ext/misc/carray.h

raw
1 /*
2 ** 2020-11-17
3 **
4 ** The author disclaims copyright to this source code. In place of
5 ** a legal notice, here is a blessing:
6 **
7 ** May you do good and not evil.
8 ** May you find forgiveness for yourself and forgive others.
9 ** May you share freely, never taking more than you give.
10 **
11 *************************************************************************
12 **
13 ** Interface definitions for the CARRAY table-valued function
14 ** extension.
15 */
16
17 #ifndef _CARRAY_H
18 #define _CARRAY_H
19
20 #include "sqlite3.h" /* Required for error code definitions */
21
22 #ifdef __cplusplus
23 extern "C" {
24 #endif
25
26 /* Use this interface to bind an array to the single-argument version
27 ** of CARRAY().
28 */
29 SQLITE_API int sqlite3_carray_bind(
30 sqlite3_stmt *pStmt, /* Statement to be bound */
31 int i, /* Parameter index */
32 void *aData, /* Pointer to array data */
33 int nData, /* Number of data elements */
34 int mFlags, /* CARRAY flags */
35 void (*xDel)(void*) /* Destructgor for aData*/
36 );
37
38 /* Allowed values for the mFlags parameter to sqlite3_carray_bind().
39 */
40 #define CARRAY_INT32 0 /* Data is 32-bit signed integers */
41 #define CARRAY_INT64 1 /* Data is 64-bit signed integers */
42 #define CARRAY_DOUBLE 2 /* Data is doubles */
43 #define CARRAY_TEXT 3 /* Data is char* */
44 #define CARRAY_BLOB 4 /* Data is struct iovec */
45
46 #ifdef __cplusplus
47 } /* end of the 'extern "C"' block */
48 #endif
49
50 #endif /* ifndef _CARRAY_H */