;;;; Author: Kevin M. Rosenberg
;;;; Date Started: Apr 2000
;;;;
-;;;; $Id: sql-classes.lisp,v 1.66 2003/05/04 01:39:04 kevin Exp $
+;;;; $Id: sql-classes.lisp,v 1.67 2003/05/04 01:42:20 kevin Exp $
;;;;
;;;; This file, part of UMLisp, is
;;;; Copyright (c) 2000-2002 by Kevin M. Rosenberg, M.D.
(%%lrl (format nil " and ~:@(~A~)<=" lrl))
(%%where (when where-name
(format nil " where ~:@(~A~)~A" where-name
- (if like " like " "=")))))
+ (if like " like " "")))))
`(concatenate
'string
,%%fields
(format nil ,(if like "'%~A%'" "'~A'") ,where-value)))
`((typecase ,where-value
(number
- (write-to-string ,where-value))
+ (concatenate 'string "=" (write-to-string ,where-value)))
(null
" is null")
(t
- (format nil ,(if like "'%~A%'" "'~A'") ,where-value)))))
+ (format nil ,(if like "'%~A%'" "'=~A'") ,where-value)))))
(if ,srl (concatenate 'string ,%%lrl (write-to-string ,srl)) "")
,@(when %%order (list %%order))
,@(when single (list " limit 1")))))