From c21f3f06ff39197ca5091a23ef1c24ff23a0242d Mon Sep 17 00:00:00 2001 From: Dimitri Fontaine Date: Sat, 24 May 2014 00:03:41 +0200 Subject: [PATCH] Retain NULL tinyints in tinyint-to-boolean, fix #65. --- src/transforms.lisp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/transforms.lisp b/src/transforms.lisp index e3669a0..6711af1 100644 --- a/src/transforms.lisp +++ b/src/transforms.lisp @@ -97,7 +97,8 @@ "When using MySQL, strange things will happen, like encoding booleans into tinyiny that are either 0 (false) or 1 (true). Of course PostgreSQL wants 'f' and 't', respectively." - (if (string= "0" integer-string) "f" "t")) + (when integer-string + (if (string= "0" integer-string) "f" "t"))) (defun int-to-ip (int) "Transform an IP as integer into its dotted notation, optimised code from