diff options
author | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2015-07-10 14:13:39 +0100 |
---|---|---|
committer | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2015-07-10 14:13:39 +0100 |
commit | 39ebf65fa5605de25cb54460119c88ce0402db85 (patch) | |
tree | 2ccc13dc78d53baaa2a29788ae0cb9eb94d152a1 /src/libutil/sqlite_utils.h | |
parent | e1b9099abb7681ac0fcd9b586790bbefe61ab2f9 (diff) | |
download | rspamd-39ebf65fa5605de25cb54460119c88ce0402db85.tar.gz rspamd-39ebf65fa5605de25cb54460119c88ce0402db85.zip |
Unify sqlite open and create function.
Diffstat (limited to 'src/libutil/sqlite_utils.h')
-rw-r--r-- | src/libutil/sqlite_utils.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/libutil/sqlite_utils.h b/src/libutil/sqlite_utils.h index 5cb71f3ad..18dd20a6f 100644 --- a/src/libutil/sqlite_utils.h +++ b/src/libutil/sqlite_utils.h @@ -68,4 +68,13 @@ gint rspamd_sqlite3_run_prstmt (sqlite3 *db, GArray *stmts, */ void rspamd_sqlite3_close_prstmt (sqlite3 *db, GArray *stmts); +/** + * Creates or opens sqlite database trying to share it between processes + * @param path + * @param create_sql + * @return + */ +sqlite3 * rspamd_sqlite3_open_or_create (const gchar *path, const + gchar *create_sql, GError **err); + #endif /* SRC_LIBUTIL_SQLITE_UTILS_H_ */ |