This repository has been archived by the owner on Jun 16, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
sqlite-connection-core.h
57 lines (36 loc) · 1.54 KB
/
sqlite-connection-core.h
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
/**
* SQLite connection core - low-level SQLite connection C library API
*/
// ref: https://www.sqlite.org/c3ref/c_blob.html
#define SCC_COLUMN_TYPE_INTEGER 1
#define SCC_COLUMN_TYPE_FLOAT 2
#define SCC_COLUMN_TYPE_TEXT 3
#define SCC_COLUMN_TYPE_NULL 5
/**
* This typedef is needed to help gluegen generate JNI C code
* that is using the correct data type.
*/
typedef long long scc_long_long;
/**
* This required initialization function should be called from the
* main thread upon startup, is __NOT__ thread-safe.
*/
void scc_init();
int scc_open_connection(const char * filename, int flags);
int scc_key(int connection_id, const char * key);
int scc_begin_statement(int connection_id, const char * statement);
int scc_bind_text(int connection_id, int index, const char * text);
int scc_bind_double(int connection_id, int index, double value);
int scc_bind_long(int connection_id, int index, scc_long_long value);
int scc_bind_null(int connection_id, int index);
int scc_step(int connection_id);
const char * scc_get_last_error_message(int connection_id);
int scc_get_column_count(int connection_id);
const char * scc_get_column_name(int connection_id, int column);
int scc_get_column_type(int connection_id, int column);
const char * scc_get_column_text(int connection_id, int column);
double scc_get_column_double(int connection_id, int column);
scc_long_long scc_get_column_long(int connection_id, int column);
int scc_get_total_changes(int connection_id);
int scc_get_last_insert_rowid(int connection_id);
int scc_end_statement(int connection_id);