static int driver_sqlite_connect(struct sql_db *_db)
{
struct sqlite_db *db = (struct sqlite_db *)_db;
-
+
if (db->connected)
return 1;
db->rc = sqlite3_open(db->dbfile, &db->sqlite);
-
+
if (db->rc == SQLITE_OK) {
db->connected = TRUE;
sqlite3_busy_timeout(db->sqlite, sqlite_busy_timeout);
if (strcmp(col, field_name) == 0)
return i;
}
-
+
return -1;
}
if (ctx->failed) {
commit_result.error = sqlite3_errmsg(db->sqlite);
callback(&commit_result, context);
- /* also does i_free(ctx) */
+ /* also does i_free(ctx) */
driver_sqlite_transaction_rollback(_ctx);
} else {
callback(&commit_result, context);
struct sqlite_db *db = (struct sqlite_db *) ctx->ctx.db;
if (ctx->failed) {
- /* also does i_free(ctx) */
+ /* also does i_free(ctx) */
driver_sqlite_transaction_rollback(_ctx);
return -1;
}