Skip to content

sqlite

sqlite is a Standard Capability: a Script calls its Operations through a Grant the Host gives it, with ask for an answer or tell for none, and a suspending one with and wait. A call the Grants don’t allow fails to load. The full rules: chapter 7. Arguments are checked against the Operation’s Shapes, and a mismatch raises wrong kind; the entries below list the other errors.

Optional: a Host may choose not to offer sqlite.

query sql, params [, max], immediate

The rows the read-only statement sql gives with params bound, as a list of maps from column name to value, in column order.

Errors: sql, not read-only, too many rows, unrepresentable, out of range.

change sql, params [, max], immediate

The map {changes, rows}: the rows the statement sql changed, and the rows it gave, such as those of a RETURNING clause; it commits with the Segment.

Errors: sql, constraint, sqlite busy, too many rows, unrepresentable, out of range.

begin, immediate

Nothing; opens the scope transaction, which rollback abandons.

Errors: sqlite busy, scope already open, scope in join.

commit, immediate

Nothing; closes the scope transaction, keeping its changes until the Segment commits.

Errors: scope not open.

rollback, immediate

Nothing; closes the scope transaction, discarding its changes.

Errors: scope not open.