Uncomment prepared statements execution

This commit is contained in:
Richard Ramos 2020-10-23 08:49:55 -04:00 committed by Michael Bradley
parent a306430824
commit 044c4a9021
1 changed files with 2 additions and 0 deletions

View File

@ -170,6 +170,7 @@ proc `$`*(dbVal: DbValue): string =
of sqliteBlob: result.add "<blob>"
of sqliteNull: result.add "nil"
result.add "]"
]#
proc exec*(db: DbConn, sql: string, params: varargs[DbValue, toDbValue]) =
## Executes ``sql`` and raises SqliteError if not successful.
@ -178,6 +179,7 @@ proc exec*(db: DbConn, sql: string, params: varargs[DbValue, toDbValue]) =
defer: prepared.finalize()
discard prepared.next
#[
# TODO: uncomment and test
proc execMany*(db: DbConn, sql: string, params: seq[seq[DbValue]]) =
## Executes ``sql`` repeatedly using each element of ``params`` as parameters.