mysql.commands

Use a DB via plain SQL statements.

Commands that are expected to return a result set - queries - have distinctive methods that are enforced. That is it will be an error to call such a method with an SQL command that does not produce a result set. So for commands like SELECT, use the query functions. For other commands, like INSERT/UPDATE/CREATE/etc, use exec.

Members

Aliases

CSN
alias CSN = ColumnSpecialization

This feature is not yet implemented. It currently has no effect.

Functions

exec
ulong exec(Connection conn, const(char[]) sql)
ulong exec(Connection conn, const(char[]) sql, T args)
ulong exec(Connection conn, const(char[]) sql, Variant[] args)
ulong exec(Connection conn, Prepared prepared)
ulong exec(Connection conn, Prepared prepared, T args)
ulong exec(Connection conn, Prepared prepared, Variant[] args)
ulong exec(Connection conn, BackwardCompatPrepared prepared)

Execute an SQL command or prepared statement, such as INSERT/UPDATE/CREATE/etc.

execImpl
ulong execImpl(Connection conn, ExecQueryImplInfo info)

Common implementation for exec overloads

query
ResultRange query(Connection conn, const(char[]) sql, ColumnSpecialization[] csa)
ResultRange query(Connection conn, const(char[]) sql, T args)
ResultRange query(Connection conn, const(char[]) sql, Variant[] args)
ResultRange query(Connection conn, Prepared prepared)
ResultRange query(Connection conn, Prepared prepared, T args)
ResultRange query(Connection conn, Prepared prepared, Variant[] args)
ResultRange query(Connection conn, BackwardCompatPrepared prepared)

Execute an SQL SELECT command or prepared statement.

queryImpl
ResultRange queryImpl(ColumnSpecialization[] csa, Connection conn, ExecQueryImplInfo info)

Common implementation for query overloads

queryRow
Nullable!Row queryRow(Connection conn, const(char[]) sql, ColumnSpecialization[] csa)
Nullable!Row queryRow(Connection conn, const(char[]) sql, T args)
Nullable!Row queryRow(Connection conn, const(char[]) sql, Variant[] args)
Nullable!Row queryRow(Connection conn, Prepared prepared)
Nullable!Row queryRow(Connection conn, Prepared prepared, T args)
Nullable!Row queryRow(Connection conn, Prepared prepared, Variant[] args)
Nullable!Row queryRow(Connection conn, BackwardCompatPrepared prepared)

Execute an SQL SELECT command or prepared statement where you only want the first mysql.result.Row, if any.

queryRowImpl
Nullable!Row queryRowImpl(ColumnSpecialization[] csa, Connection conn, ExecQueryImplInfo info)

Common implementation for querySet overloads.

queryRowTuple
void queryRowTuple(Connection conn, const(char[]) sql, T args)
void queryRowTuple(Connection conn, Prepared prepared, T args)
void queryRowTuple(Connection conn, BackwardCompatPrepared prepared, T args)

Execute an SQL SELECT command or prepared statement where you only want the first mysql.result.Row, and place result values into a set of D variables.

queryRowTupleImpl
void queryRowTupleImpl(Connection conn, ExecQueryImplInfo info, T args)

Common implementation for queryRowTuple overloads.

queryValue
Nullable!Variant queryValue(Connection conn, const(char[]) sql, ColumnSpecialization[] csa)
Nullable!Variant queryValue(Connection conn, const(char[]) sql, T args)
Nullable!Variant queryValue(Connection conn, const(char[]) sql, Variant[] args)
Nullable!Variant queryValue(Connection conn, Prepared prepared)
Nullable!Variant queryValue(Connection conn, Prepared prepared, T args)
Nullable!Variant queryValue(Connection conn, Prepared prepared, Variant[] args)
Nullable!Variant queryValue(Connection conn, BackwardCompatPrepared prepared)

Execute an SQL SELECT command or prepared statement and return a single value: the first column of the first row received.

queryValueImpl
Nullable!Variant queryValueImpl(ColumnSpecialization[] csa, Connection conn, ExecQueryImplInfo info)

Common implementation for queryValue overloads.

Structs

ColumnSpecialization
struct ColumnSpecialization

This feature is not yet implemented. It currently has no effect.

Meta