Struct Statement

A prepared statement.

struct Statement ;

This struct is a reference-counted wrapper around a sqlite3_stmt* pointer. Instances of this struct are typically returned by Database.prepare().

Methods

NameDescription
bind (index, value) Binds values to parameters of this statement, using parameter index.
bind (name, value) Binds values to parameters of this statement, using parameter names.
bindAll (args) Binds all the arguments at once in order.
clearBindings () Clears the bindings.
empty () Tells whether the statement is empty (no SQL statement).
execute () Executes the statement and return a (possibly empty) range of results.
finalize () Explicitly finalizes the prepared statement.
handle () Gets the SQLite internal handle of the statement.
inject (args) Binds arguments, executes and resets the statement, in one call.
inject (obj) Binds the fields of a struct in order, executes and resets the statement, in one call.
inject (obj) Binds iterable values in order, executes and resets the statement, in one call.
parameterCount () Gets the count of bind parameters.
parameterIndex (name) Gets the index of a bind parameter.
parameterName (index) Gets the name of the bind parameter at the given index.
reset () Resets a this statement before a new execution.