Skip to content

Commit

Permalink
Allow composed-statement to be taken by retrieve-by-sql.
Browse files Browse the repository at this point in the history
  • Loading branch information
fukamachi committed Apr 15, 2018
1 parent dd81514 commit 74b441b
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/core/db.lisp
Expand Up @@ -21,6 +21,8 @@
#:yield)
(:import-from #:sxql.sql-type
#:sql-statement)
(:import-from #:sxql.composed-statement
#:composed-statement)
(:export #:last-insert-id
#:table-indices
#:column-definitions
Expand Down Expand Up @@ -160,6 +162,12 @@
(trace-sql sql binds results)
results))
(:method ((sql sql-statement) &key binds)
(declare (ignore binds))
(with-quote-char
(multiple-value-bind (sql binds)
(sxql:yield sql)
(retrieve-by-sql sql :binds binds))))
(:method ((sql composed-statement) &key binds)
(declare (ignore binds))
(with-quote-char
(multiple-value-bind (sql binds)
Expand Down

0 comments on commit 74b441b

Please sign in to comment.