eudoxia0 / crane

An ORM for Common Lisp.
http://eudoxia.me/crane/
201 stars 19 forks source link

changes in cl-dbi breakes crane #56

Open bpanthi977 opened 4 years ago

bpanthi977 commented 4 years ago

The commit changes how parameters are passed to dbi:execute (as explained here)

For my use cases changing apply to funcall in the meta-query macro fixed the problem.

(defmacro meta-query (query database-name body)
  `(multiple-value-bind (sql args) (sxql:yield ,query)
     (when (crane.config:debugp)
       (format t "~&Query: ~A~&" sql))
     (let* ((prepared (dbi:prepare (crane.connect:get-connection ,database-name)
                                   sql))
            (result (funcall #'dbi:execute
                           prepared args)))
       (when result ,body))))

I am not sure if this is all it takes to fix this problem. I hope it is fixed soon.

And thanks for this nice library. :)