X-Git-Url: http://git.kpe.io/?a=blobdiff_plain;f=sql-classes.lisp;h=a66a455495ccc4ef02bd745af308dc11b39ebc3b;hb=7ecbfa0b3062a1995296d1b97cf557e57c3ed1df;hp=6e62db214a273c52f4837b2f74e240b971f78aec;hpb=0b911ce4954aa8813e3c792c4362bad5c4bd9cce;p=umlisp.git diff --git a/sql-classes.lisp b/sql-classes.lisp index 6e62db2..a66a455 100644 --- a/sql-classes.lisp +++ b/sql-classes.lisp @@ -7,7 +7,7 @@ ;;;; Author: Kevin M. Rosenberg ;;;; Date Started: Apr 2000 ;;;; -;;;; $Id: sql-classes.lisp,v 1.71 2003/05/06 01:34:57 kevin Exp $ +;;;; $Id: sql-classes.lisp,v 1.72 2003/05/06 02:41:01 kevin Exp $ ;;;; ;;;; This file, part of UMLisp, is ;;;; Copyright (c) 2000-2002 by Kevin M. Rosenberg, M.D. @@ -59,16 +59,15 @@ 'string (format nil "select ~A~{~:@(~A~)~^,~} from ~:@(~A~)" (if distinct "distinct " "") fields table) + (if where-name (format nil " where ~:@(~A~)" where-name) "") (if where-name (format nil (typecase where-value - (number " where ~A=~D") - (null " where ~A is null") + (number "=~D") + (null " is null") (t - (if like - " where ~A like '%~A%'" - " where ~A='~A'"))) - where-name where-value) + (if like " like '%~A%""='~A'"))) + where-value) "") (if srl (format nil " and ~:@(~A~)<=~D" lrl srl) "") (if order (format nil " order by ~{~:@(~A~) ~(~A~)~^,~}" order) "")