6 #include "../sqlite/libsqlite3/sqlite3.h"
8 typedef struct SQLiteResult
{
14 typedef SQLiteResult SQLiteConn
;
15 typedef int SQLiteModuleIdentifier
;
16 typedef void (*SQLiteQueryHandler
)(SQLiteConn
*, void *);
18 void sqliteasyncqueryf(SQLiteModuleIdentifier identifier
, SQLiteQueryHandler handler
, void *tag
, int flags
, char *format
, ...) __attribute__ ((format (printf
, 5, 6)));
19 void sqliteasyncqueryfv(int identifier
, SQLiteQueryHandler handler
, void *tag
, int flags
, char *format
, va_list ap
);
21 int sqliteconnected(void);
23 int sqlitegetid(void);
24 void sqlitefreeid(int);
26 size_t sqliteescapestring(char *buf
, char *src
, unsigned int len
);
28 SQLiteResult
*sqlitegetresult(SQLiteConn
*);
29 int sqlitefetchrow(SQLiteResult
*);
30 void sqliteclear(SQLiteResult
*);
32 int sqlitequerysuccessful(SQLiteResult
*);
34 #define sqlitegetvalue(result, column) ((char *)sqlite3_column_text(result->r, column))
36 void sqliteattach(char *schema
);
37 void sqlitedetach(char *schema
);
38 void sqliteloadtable(char *tablename
, SQLiteQueryHandler init
, SQLiteQueryHandler data
, SQLiteQueryHandler fini
, void *tag
);