SQLite3.Statement

The database is accessed using statements.

First, a statement is prepared from a SQL query. Then, values are bound to the parameters in the statement using bind. Finally, the statement is executed using step.

Constructors

this
this(string sql)

Compiles the SQL statement. Values can then be bound to the parameters of the statement using bind.

Destructor

~this
~this()
Undocumented in source.

Members

Functions

bind
void bind(T args)

Bind multiple values to the statement.

clear
void clear()

Sets all bindings to NULL.

get
T get(uint i)
const(void)[] get(uint i)

Gets the value of a column.

getRow
void getRow(T args)

Gets the values in the row..

isNull
bool isNull(uint i)

Returns true if the column index has a NULL value.

opIndex
uint opIndex(string name)

Gets the index of the bind parameter name.

opIndexAssign
void opIndexAssign(T v, uint i)
void opIndexAssign(const(ubyte)[] v, uint i)

Binds a value to the statement at a particular index. Indices start at 0.

opIndexAssign
void opIndexAssign(T v, uint i)
Undocumented in source. Be warned that the author may not have intended to support it.
opIndexAssign
void opIndexAssign(T v, uint i)
Undocumented in source. Be warned that the author may not have intended to support it.
opIndexAssign
void opIndexAssign(ubyte[] v, uint i)
Undocumented in source. Be warned that the author may not have intended to support it.
opIndexAssign
void opIndexAssign(T v, string name)

Binds a value by name.

reset
void reset()

Resets the execution of this statement. This must be called after step returns false.

step
bool step()

Steps through the results of the statement. Returns true while there are results or false if there are no more results.

Properties

columns
uint columns [@property getter]

Returns the number of columns in the result set. This number will be 0 if there is no result set (e.g., INSERT, UPDATE, CREATE TABLE).

handle
sqlite3_stmt* handle [@property getter]

Returns the internal SQLite3 statement handle. This should only be used if this class does not provide the necessary functionality.

sql
string sql [@property getter]

Returns the SQL statement string.

Meta