Statement

An SQLite statement execution.

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

Members

Functions

bind
void bind(int index, T value)

Binds values to parameters of this statement.

bind
void bind(string name, T value)

Binds values to parameters of this statement.

bindAll
void bindAll(Args args)

Binds all the arguments at once in order.

clearBindings
void clearBindings()

Clears the bindings.

empty
bool empty()

Tells whether the statement is empty (no SQL statement).

execute
ResultRange execute()

Executes the statement and return a (possibly empty) range of results.

handle
sqlite3_stmt* handle()

Gets the SQLite internal handle of the statement.

inject
void inject(Args args)

Convenience function equivalent of:

parameterCount
int parameterCount()

Gets the count of bind parameters.

parameterIndex
int parameterIndex(string name)

Gets the index of a bind parameter.

parameterName
string parameterName(int index)

Gets the name of the bind parameter at the given index.

reset
void reset()

Resets a this statement before a new execution.

Meta