;;;; 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.
"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)
(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))
"")))