diff options
author | Araq <rumpf_a@web.de> | 2015-01-10 23:52:05 +0100 |
---|---|---|
committer | Araq <rumpf_a@web.de> | 2015-01-10 23:52:29 +0100 |
commit | a41b62da970f9795cc4e8bc4fecbdb386dc18d80 (patch) | |
tree | fc17248a3db33debd20ddc4ad01ddeccc4b3c779 /lib/impure/db_sqlite.nim | |
parent | 27141f601631410d18135a1e1db974177bf142e1 (diff) | |
download | Nim-a41b62da970f9795cc4e8bc4fecbdb386dc18d80.tar.gz |
fixes #1866
Diffstat (limited to 'lib/impure/db_sqlite.nim')
-rw-r--r-- | lib/impure/db_sqlite.nim | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/impure/db_sqlite.nim b/lib/impure/db_sqlite.nim index bc9e0b591..bf1ce75ef 100644 --- a/lib/impure/db_sqlite.nim +++ b/lib/impure/db_sqlite.nim @@ -48,6 +48,7 @@ proc dbError*(msg: string) {.noreturn.} = raise e proc dbQuote(s: string): string = + if s.isNil: return "NULL" result = "'" for c in items(s): if c == '\'': add(result, "''") @@ -61,7 +62,7 @@ proc dbFormat(formatstr: TSqlQuery, args: varargs[string]): string = if c == '?': add(result, dbQuote(args[a])) inc(a) - else: + else: add(result, c) proc tryExec*(db: TDbConn, query: TSqlQuery, |