do-sql: trying some variations: hangs with sqlite; free-query-resources: error on postgres
This commit is contained in:
parent
3f3da9b69b
commit
bc6c1d8e31
1 changed files with 7 additions and 0 deletions
|
@ -66,6 +66,13 @@
|
||||||
;(print sql)
|
;(print sql)
|
||||||
(dbi:do-sql (conn st) sql args)))
|
(dbi:do-sql (conn st) sql args)))
|
||||||
|
|
||||||
|
(defun xdo-sql (st spec)
|
||||||
|
(multiple-value-bind (sql args) (sxql:yield spec)
|
||||||
|
(let* ((conn (conn st))
|
||||||
|
(qu (dbi:execute (dbi:prepare conn sql) args)))
|
||||||
|
(dbi:free-query-resources qu)
|
||||||
|
(dbi:row-count conn))))
|
||||||
|
|
||||||
(defun drop-table (st tn)
|
(defun drop-table (st tn)
|
||||||
(do-sql st (sxql:drop-table tn :if-exists t)))
|
(do-sql st (sxql:drop-table tn :if-exists t)))
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue