minor improvement for the db_sqlite module
This commit is contained in:
parent
414e7eff04
commit
7083c8df57
1 changed files with 2 additions and 1 deletions
|
|
@ -129,7 +129,8 @@ proc tryExec*(db: DbConn, query: SqlQuery,
|
|||
var q = dbFormat(query, args)
|
||||
var stmt: sqlite3.Pstmt
|
||||
if prepare_v2(db, q, q.len.cint, stmt, nil) == SQLITE_OK:
|
||||
if step(stmt) == SQLITE_DONE:
|
||||
let x = step(stmt)
|
||||
if x in {SQLITE_DONE, SQLITE_ROW}:
|
||||
result = finalize(stmt) == SQLITE_OK
|
||||
|
||||
proc exec*(db: DbConn, query: SqlQuery, args: varargs[string, `$`]) {.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue