From 0bed331173815bfe0544c0fdad6fb8b83ae929f1 Mon Sep 17 00:00:00 2001 From: Russ Tyndall Date: Wed, 8 Jun 2011 17:12:57 -0400 Subject: [PATCH] made select accept a parameters argument. If parameters are supplied, it builds a command object and executes that instead of the flat query. This allows you to return objects and use parameters prev: 8b4602546d876db6e9853635d694de1993214127 --- sql/oodml.lisp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/sql/oodml.lisp b/sql/oodml.lisp index fced9aa..99cf021 100644 --- a/sql/oodml.lisp +++ b/sql/oodml.lisp @@ -1086,7 +1086,7 @@ maximum of MAX-LEN instances updated in each query." order-by offset limit refresh flatp result-types inner-join on (database *default-database*) - instances) + instances parameters) "Called by SELECT to generate object query results when the View Classes VIEW-CLASSES are passed as arguments to SELECT." (declare (ignore all set-operation group-by having offset limit inner-join on)) @@ -1313,6 +1313,7 @@ as elements of a list." results)))))))) (t (let* ((expr (apply #'make-query select-all-args)) + (parameters (second (member :parameters select-all-args))) (specified-types (mapcar #'(lambda (attrib) (if (typep attrib 'sql-ident-attribute) @@ -1328,6 +1329,8 @@ as elements of a list." (database *default-database*) &allow-other-keys) qualifier-args + (when parameters + (setf expr (command-object (sql-output expr database) parameters))) (query expr :flatp flatp :result-types ;; specifying a type for an attribute overrides result-types -- 2.34.1