diff options
author | Egor Tensin <Egor.Tensin@gmail.com> | 2023-07-07 15:42:55 +0200 |
---|---|---|
committer | Egor Tensin <Egor.Tensin@gmail.com> | 2023-07-07 15:53:37 +0200 |
commit | 7f955ff6f6a7f2407b24a638fde95efbd5c38737 (patch) | |
tree | a74f84fafba568d01db0277db434075dfbde5132 /src/sqlite | |
parent | storage_sqlite: avoid races when inserting repos (diff) | |
download | cimple-7f955ff6f6a7f2407b24a638fde95efbd5c38737.tar.gz cimple-7f955ff6f6a7f2407b24a638fde95efbd5c38737.zip |
sqlite: minor refactoring
Diffstat (limited to '')
-rw-r--r-- | src/sqlite.c | 4 | ||||
-rw-r--r-- | src/sqlite.h | 3 |
2 files changed, 3 insertions, 4 deletions
diff --git a/src/sqlite.c b/src/sqlite.c index 8078739..7080928 100644 --- a/src/sqlite.c +++ b/src/sqlite.c @@ -46,7 +46,7 @@ void sqlite_destroy(void) sqlite_errno_if(sqlite3_shutdown(), "sqlite3_shutdown"); } -int sqlite_open(const char *path, sqlite3 **db, int flags) +static int sqlite_open(const char *path, sqlite3 **db, int flags) { int ret = 0; @@ -89,7 +89,7 @@ int sqlite_exec(sqlite3 *db, const char *stmt, sqlite3_callback callback, void * return ret; } -int sqlite_log_result(UNUSED void *arg, int numof_columns, char **values, char **column_names) +int sqlite_exec_log_result(UNUSED void *arg, int numof_columns, char **values, char **column_names) { log("Row:\n"); for (int i = 0; i < numof_columns; ++i) { diff --git a/src/sqlite.h b/src/sqlite.h index 5f5b285..20386d4 100644 --- a/src/sqlite.h +++ b/src/sqlite.h @@ -13,13 +13,12 @@ int sqlite_init(void); void sqlite_destroy(void); -int sqlite_open(const char *path, sqlite3 **db, int flags); int sqlite_open_rw(const char *path, sqlite3 **db); int sqlite_open_ro(const char *path, sqlite3 **db); void sqlite_close(sqlite3 *db); int sqlite_exec(sqlite3 *db, const char *stmt, sqlite3_callback callback, void *arg); -int sqlite_log_result(void *, int, char **, char **); +int sqlite_exec_log_result(void *, int, char **, char **); int sqlite_prepare(sqlite3 *db, const char *stmt, sqlite3_stmt **result); void sqlite_reset(sqlite3_stmt *); |