db_mysql.nim: Work around string nil comparison logic

This commit is contained in:
Andreas Rumpf
2018-06-04 12:20:56 +02:00
parent 395b7506cf
commit 582786d068

View File

@@ -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]))