Statement

A prepared statement.

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

Constructors

this
this(Database db, string sql)
Undocumented in source.

Members

Functions

bind
void bind(int index, T value)

Binds values to parameters of this statement, using parameter index.

bind
void bind(string name, T value)

Binds values to parameters of this statement, using parameter names.

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.

finalize
void finalize()

Explicitly finalizes the prepared statement.

handle
inout(sqlite3_stmt)* handle()

Gets the SQLite internal handle of the statement.

inject
void inject(Args args)

Binds arguments, executes and resets the statement, in one call.

inject
void inject(T obj)

Binds the fields of a struct in order, executes and resets the statement, in one call.

inject
void inject(T obj)

Binds iterable values in order, executes and resets the statement, in one call.

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.

waitForUnlockNotify
auto waitForUnlockNotify()

Setup and waits for unlock notify using the provided IUnlockNotifyHandler

Meta