- ,@body)))
- (loop
- for tuple in ,query collect
- (destructuring-bind ,fields tuple
- ,@body)))))))
-
-(defun umlisp-query (table fields srl where-name where-value
- &key (lrlname "KCUILRL") single distinct order like)
+ ,@body)))))
+ `(let ((,value ,where-value))
+ (when ,value
+ (loop for tuple in
+ (umlisp-query ,table ,fields ,srl ,where-name ,value
+ :lrl ,lrl :single ,single :distinct ,distinct
+ :order ,order :like ,like)
+ collect (destructuring-bind ,fields tuple
+ ,@body)))))))
+
+(defmacro umlisp-query (table fields srl where-name where-value
+ &key (lrl "KCUILRL") single distinct order like)