2 #include "../acl_cpp_define.hpp" 3 #include "../stdlib/string.hpp" 4 #include "../db/db_handle.hpp" 6 #if !defined(ACL_DB_DISABLE) 23 db_sqlite(
const char* dbfile,
const char* charset =
"utf-8");
30 const char* version(
void)
const;
40 bool set_conf(
const char* pragma);
50 const char* get_conf(
const char* pragma,
string& out);
57 void show_conf(
const char* pragma = NULL);
63 int affect_total_count(
void)
const;
101 int sqlite3_prepare_v2(
const char *zSql,
136 const void *value,
int n,
void(*destory)(
void*));
145 int sqlite3_bind_int(
sqlite3_stmt *stmt,
int iCol,
int value);
154 int sqlite3_bind_int64(
sqlite3_stmt* stmt,
int iCol,
long long int value);
166 const char *value,
int n,
void(*destory)(
void*));
181 const void *sqlite3_column_blob(
sqlite3_stmt *stmt,
int iCol);
197 long long int sqlite3_column_int64(
sqlite3_stmt *stmt,
int iCol);
205 const unsigned char *sqlite3_column_text(
sqlite3_stmt *stmt,
int iCol);
221 const char *sqlite3_column_name(
sqlite3_stmt *stmt,
int iCol);
231 int sqlite3_exec(
const char *sql,
232 int(*callback)(
void*,
int,
char**,
char**),
void *arg,
char **errmsg);
238 void sqlite3_free(
void* ptr);
247 const char* dbtype(
void)
const;
252 int get_errno(
void)
const;
257 const char* get_error(
void)
const;
262 bool dbopen(
const char* charset = NULL);
267 bool is_opened(
void)
const;
277 bool tbl_exists(
const char* tbl_name);
282 bool sql_select(
const char* sql,
db_rows* result = NULL);
287 bool sql_update(
const char* sql);
292 int affect_count(
void)
const;
297 bool begin_transaction(
void);
307 bool set_busy_timeout(
int nMillisecs);
324 bool exec_sql(
const char* sql,
db_rows* result = NULL);
329 #endif // !defined(ACL_DB_DISABLE)
sqlite3 * get_conn(void) const
struct sqlite3_stmt sqlite3_stmt