[postmodern-devel] Calling a SQL func as a DAO field value
Julien Danjou
julien at danjou.info
Tue Dec 25 20:47:42 UTC 2012
On Tue, Dec 25 2012, Marijn Haverbeke wrote:
> If I do
>
> cl-user> (s-sql:sql (:now))
>
> It produces "now()" for me.
Sure, for me too. So let me give you a bit more context.
If you've a class like:
(defclass user ()
((mytimestamp :col-type timestamp :accessor mytimestamp))
(:metaclass dao-class))
And try to do:
(setf (mytimestamp user) '(:now))
(update-dao user)
This raises things like:
Value (:NOW) can not be converted to an SQL literal.
at run-time.
Maybe `setf' is not the right way to modify this field here?
--
Julien Danjou
# Free Software hacker & freelance
# http://julien.danjou.info
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 835 bytes
Desc: not available
URL: <https://mailman.common-lisp.net/pipermail/postmodern-devel/attachments/20121225/922656f4/attachment.sig>
More information about the postmodern-devel
mailing list