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

A struct to represent specializations of prepared statement parameters.

queryResult
deprecated alias queryResult = querySet

Execute a one-off SQL SELECT command where you expect the entire result set all at once.

querySequence
deprecated alias querySequence = query

Execute a one-off SQL SELECT command where you want to deal with the result set one row at a time.

queryTuple
deprecated alias queryTuple = queryRowTuple

Execute a one-off SQL SELECT command where you only want the first Row, and place result values into a set of D variables.

Functions

exec
ulong exec(Connection conn, string sql)

Execute a one-off SQL command, such as INSERT/UPDATE/CREATE/etc.

execImpl
ulong execImpl(Connection conn, ExecQueryImplInfo info)

Common implementation for mysql.commands.exec and Prepared.exec

execQueryImpl
bool execQueryImpl(Connection conn, ExecQueryImplInfo info, ulong ra)
bool execQueryImpl(Connection conn, ExecQueryImplInfo info)

Internal implementation for the exec and query functions.

query
ResultRange query(Connection conn, string sql, ColumnSpecialization[] csa)

Execute a one-off SQL SELECT command where you want to deal with the result set one row at a time.

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

Common implementation for mysql.commands.query and Prepared.query

queryRow
Nullable!Row queryRow(Connection conn, string sql, ColumnSpecialization[] csa)

Execute a one-off SQL SELECT command where you only want the first Row (if any).

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

Common implementation for mysql.commands.querySet and Prepared.querySet

queryRowTuple
void queryRowTuple(Connection conn, string sql, T args)

Execute a one-off SQL SELECT command where you only want the first Row, and place result values into a set of D variables.

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

Common implementation for mysql.commands.queryRowTuple and Prepared.queryRowTuple

querySet
ResultSet querySet(Connection conn, string sql, ColumnSpecialization[] csa)

Execute a one-off SQL SELECT command where you expect the entire result set all at once.

querySetImpl
ResultSet querySetImpl(ColumnSpecialization[] csa, bool binary, Connection conn, ExecQueryImplInfo info)

Common implementation for mysql.commands.querySet and Prepared.querySet

queryValue
Nullable!Variant queryValue(Connection conn, string sql, ColumnSpecialization[] csa)

Execute a one-off SQL SELECT command and returns a single value, the first column of the first row received.

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

Common implementation for mysql.commands.querySet and Prepared.querySet

Structs

ColumnSpecialization
struct ColumnSpecialization

A struct to represent specializations of prepared statement parameters.

Command
struct Command

(deprecated) Encapsulation of an SQL command or query.

ExecQueryImplInfo
struct ExecQueryImplInfo
Undocumented in source.

Meta