mirror of
https://github.com/nim-lang/Nim.git
synced 2026-07-18 15:01:24 +00:00
db_mysql.nim: Work around string nil comparison logic
This commit is contained in:
@@ -128,7 +128,7 @@ proc dbFormat(formatstr: SqlQuery, args: varargs[string]): string =
|
||||
var a = 0
|
||||
for c in items(string(formatstr)):
|
||||
if c == '?':
|
||||
if args[a] == nil:
|
||||
if args[a].isNil:
|
||||
add(result, "NULL")
|
||||
else:
|
||||
add(result, dbQuote(args[a]))
|
||||
|
||||
Reference in New Issue
Block a user