mysql.unsafe.commands

Use a DB via plain SQL statements (unsafe version).

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.

This is the @system version of mysql's command module, and as such uses the @system rows and result ranges, and the Variant type. For the MySQLVal safe version, please import mysql.safe.commands.

Members

Aliases

CSN
alias CSN = ColumnSpecialization
Undocumented in source.
ColumnSpecialization
alias ColumnSpecialization = SC.ColumnSpecialization
Undocumented in source.

Functions

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

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

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

Execute an SQL SELECT command or prepared statement.

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

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

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.UnsafeRow, and place result values into a set of D variables.

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.

Meta