Hello,
I'm working on a Postmodern backend for weblocks. To conform to their Store APIhttp://bitbucket.org/S11001001/weblocks-dev/src/f14b59da2238/src/store/store-api.lisp I need to implement a count-persistent-objects method. I would like to be able to write something like:
(defmethod count-persistent-objects ((store list) class-name &key where &allow-other-keys) (let ((sql-expr `(:select (:count '*) :from ,class-name ,@(when where (list :where where))))) (with-connection store (query sql-expr :single))))
However a simple test of this results in a type error: The value of CL-POSTGRES::QUERY is (:SELECT (:COUNT '*) :FROM QUOTES), which is not of type STRING.
Is there a reason that query doesn't support evaluated lists? If so, how would you recommend this be done?
Regards, Brit Butler