r4871: *** empty log message ***
[umlisp.git] / create-sql.lisp
index e81440d1c51be43f40025f82598bdd06c9830ade..a6f8ad390f4f0aecfa9ae10fbcf186923e203c3e 100644 (file)
@@ -7,7 +7,7 @@
 ;;;; Author:        Kevin M. Rosenberg
 ;;;; Date Started:  Apr 2000
 ;;;;
-;;;; $Id: create-sql.lisp,v 1.1 2003/05/07 21:57:06 kevin Exp $
+;;;; $Id: create-sql.lisp,v 1.2 2003/05/07 22:53:36 kevin Exp $
 ;;;;
 ;;;; This file, part of UMLisp, is
 ;;;;    Copyright (c) 2000-2002 by Kevin M. Rosenberg, M.D.
@@ -49,8 +49,9 @@
   "Return sql insert command for a row of values"  
   (let ((insert-func
         (lambda (col value)
-          (let ((q (quotechar col)))
-            (concatenate 'string q (insert-col-value col value) q)))))
+          (concatenate 'string (quote-str col)
+                       (insert-col-value col value)
+                       (quote-str col)))))
     (format
      nil "INSERT INTO ~a (~{~a~^,~}) VALUES (~A)"
      (table file)
@@ -65,8 +66,9 @@
   (let ((custom-value (funcall (custom-value-fun col) values)))
     (if custom-value
        (if doquote
-           (let ((q (quotechar col)))
-             (concatenate 'string q (escape-backslashes custom-value) q))
+           (concatenate 'string (quote-str col)
+                        (escape-backslashes custom-value)
+                        (quote-str col))
            (escape-backslashes custom-value))
        "")))