sql-compile is exactly what I was looking for. Thanks Marijn. And thank you for Postmodern!
> Is there a reason that query doesn't support evaluated lists?Yes. These macros also accept string input, and assume that everything
that's not a list starting with a keyword will evaluate to a string.
You can either add an sql-compile around your sql-expr, which does a
> If so, how would you recommend this be done?
run-time compilation of an s-sql expression (normally they happen at
compile time), or do something like this:
&key (where t) &allow-other-keys)
(defmethod count-persistent-objects ((store list) class-name
(with-connection store
(sql (:select (:count '*) :from class-name :where
(:raw (if (stringp where) where (sql-compile where)))))))
Best,
Marijn
_______________________________________________
postmodern-devel mailing list
postmodern-devel@common-lisp.net
http://common-lisp.net/cgi-bin/mailman/listinfo/postmodern-devel