From 9aafcb72bd7ca1d7e908938b6a5319753b3371d9 Mon Sep 17 00:00:00 2001 From: Ryszard Szopa Date: Sun, 4 Jan 2009 01:39:27 +0100 Subject: [PATCH] Make functional expressions work with :desc and :asc specifiers. --- sql/oodml.lisp | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/sql/oodml.lisp b/sql/oodml.lisp index 6283ee7..fb76c55 100644 --- a/sql/oodml.lisp +++ b/sql/oodml.lisp @@ -1097,13 +1097,17 @@ 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 (typecase (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))) + (handler-case + (unless (slot-value (nth i order-by-list) 'qualifier) + (setf (slot-value (nth i order-by-list) 'qualifier) table-name)) + (simple-error ()))) (cons - (unless (slot-value (car (nth i order-by-list)) 'qualifier) - (setf (slot-value (car (nth i order-by-list)) 'qualifier) table-name))) + (handler-case + (unless (slot-value (car (nth i order-by-list)) 'qualifier) + (setf (slot-value (car (nth i order-by-list)) 'qualifier) table-name)) + (simple-error ()))) (clsql-sys:sql-function-exp))) (setf (getf qualifier-args :order-by) order-by-list))) -- 2.34.1