Execute code with an open handle to a BLOB in SQLite.
sql
with-sqlite-blob (blob-var table-name column-name rowid &key database owner read-only) &body body => results-of-body
blob-var⇩ |
A symbol. |
Strings. | |
rowid⇩ |
An integer. |
database⇩ |
A SQLite database. |
owner⇩ |
A string. |
read-only⇩ |
A generalized boolean. |
body⇩ |
Lisp forms. |
results-of-body⇩ |
Multiple values of any Lisp type. |
The macro with-sqlite-blob
opens a BLOB by calling sqlite-open-blob with database, owner, table-name, column-name, rowid and read-only, binds blob-var to the resulting sqlite-blob, and evaluates the forms in body (as an implicit progn) inside the binding and inside an unwind-protect that closes blob-var on exit.
The return values of with-sqlite-blob
, results-of-body, are whatever body returns.
Because with-sqlite-blob
guarantees to close the BLOB when it exits, you should use it in preference to calling sqlite-open-blob directly.
LispWorks® User Guide and Reference Manual - 01 Dec 2021 19:30:56