From: Ryszard Szopa Date: Sun, 4 Jan 2009 00:23:07 +0000 (+0100) Subject: Make it possible to pass functional expression to :order-by in select. X-Git-Url: http://git.kpe.io/?a=commitdiff_plain;h=0c4d66aaaf81025974508a4e7b5d10205e4db7f7;hp=581e3910304b4054f41b0cb41105b03519af63b1;p=clsql.git Make it possible to pass functional expression to :order-by in select. --- diff --git a/sql/oodml.lisp b/sql/oodml.lisp index cc57941..6283ee7 100644 --- a/sql/oodml.lisp +++ b/sql/oodml.lisp @@ -1097,13 +1097,14 @@ as elements of a list." (order-by-list (copy-seq (listify order-by)))) (loop for i from 0 below (length order-by-list) - do (etypecase (nth i order-by-list) + do (etypecase (nth i order-by-list) (sql-ident-attribute (unless (slot-value (nth i order-by-list) 'qualifier) (setf (slot-value (nth i order-by-list) 'qualifier) table-name))) (cons (unless (slot-value (car (nth i order-by-list)) 'qualifier) - (setf (slot-value (car (nth i order-by-list)) 'qualifier) table-name))))) + (setf (slot-value (car (nth i order-by-list)) 'qualifier) table-name))) + (clsql-sys:sql-function-exp))) (setf (getf qualifier-args :order-by) order-by-list))) (cond