;;;;
;;;; This file, part of UMLisp, is
;;;; Copyright (c) 2000-2002 by Kevin M. Rosenberg, M.D.
;;;;
;;;; This file, part of UMLisp, is
;;;; Copyright (c) 2000-2002 by Kevin M. Rosenberg, M.D.
&key (lrlname "KCUILRL") single distinct order like)
(let* ((%%fields (format nil "select ~A~{~:@(~A~)~^,~} from ~:@(~A~)"
(if distinct "distinct " "") fields table))
&key (lrlname "KCUILRL") single distinct order like)
(let* ((%%fields (format nil "select ~A~{~:@(~A~)~^,~} from ~:@(~A~)"
(if distinct "distinct " "") fields table))
- (%%order (if order (format nil " order by ~{~:@(~A~) ~(~A~)~^,~}" order) "")))
+ (%%order (if order (format nil " order by ~{~:@(~A~) ~(~A~)~^,~}" order) ""))
+ (%%lrl (format nil " and ~:@(~A~) <= ~~D" lrlname)))
- (format nil
- (if (stringp ,where-value)
- (if ,like " where ~A like '%~A%'" " where ~A='~A'")
- " where ~A=~A")
+ (format nil (if (stringp ,where-value)
+ (if ,like " where ~A like '%~A%'" " where ~A='~A'")
+ " where ~A=~A")
- (if ,srl (format nil " and ~:@(~A~) <= ~D" ,lrlname ,srl) "")
+ (if ,srl (format nil ,%%lrl ,srl) "")