Expand dbQuote to handle backslashes

This commit is contained in:
Euan T
2016-06-16 18:40:35 +01:00
committed by treeform
parent ee5a76fd9d
commit c678ac3f33

View File

@@ -120,6 +120,7 @@ proc dbQuote*(s: string): string =
result = "'"
for c in items(s):
if c == '\'': add(result, "''")
if c == '\\': add(result, "\\\\")
else: add(result, c)
add(result, '\'')