All Manuals > LispWorks User Guide and Reference Manual > 47 The SQL Package

NextPrevUpTopContentsIndex

with-sqlite-blob

Macro
Summary

Execute code with an open handle to a BLOB in SQLite.

Package

sql

Signature

with-sqlite-blob (blob-var table-name column-name rowid &key database owner read-only) &body body => results-of-body

Arguments

blob-var

A symbol.

table-name, column-name

Strings.

rowid

An integer.

database

A SQLite database.

owner

A string.

read-only

A generalized boolean.

body

Lisp forms.

Values

results-of-body

Multiple values of any Lisp type.

Description

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.

Notes

Because with-sqlite-blob guarantees to close the BLOB when it exits, you should use it in preference to calling sqlite-open-blob directly.

See also

sqlite-open-blob


LispWorks User Guide and Reference Manual - 20 Sep 2017

NextPrevUpTopContentsIndex