Make it possible to pass functional expression to :order-by in select.
authorRyszard Szopa <ryszard.szopa@gmail.com>
Sun, 4 Jan 2009 00:23:07 +0000 (01:23 +0100)
committerRyszard Szopa <ryszard.szopa@gmail.com>
Sun, 4 Jan 2009 00:23:07 +0000 (01:23 +0100)
sql/oodml.lisp

index cc57941e38e2520e80e48cad4ab50fa42b4c9b11..6283ee771ef10ff6df899310d2fe960f9ae07bba 100644 (file)
@@ -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