Module 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.

Functions

NameDescription
exec(conn, sql) Execute a one-off SQL command, such as INSERT/UPDATE/CREATE/etc.
query(conn, sql, csa) Execute a one-off SQL SELECT command where you want to deal with the result set one row at a time.
queryRow(conn, sql, csa) Execute a one-off SQL SELECT command where you only want the first Row (if any).
queryRowTuple(conn, sql, 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.
querySet(conn, sql, csa) Execute a one-off SQL SELECT command where you expect the entire result set all at once.
queryValue(conn, sql, csa) Execute a one-off SQL SELECT command and returns a single value, the first column of the first row received.

Structs

NameDescription
ColumnSpecialization A struct to represent specializations of prepared statement parameters.
Command (deprecated) Encapsulation of an SQL command or query.

Aliases

NameTypeDescription
CSN ColumnSpecialization A struct to represent specializations of prepared statement parameters.
queryResult Execute a one-off SQL SELECT command where you expect the entire result set all at once.
querySequence Execute a one-off SQL SELECT command where you want to deal with the result set one row at a time.
queryTuple Execute a one-off SQL SELECT command where you only want the first Row, and place result values into a set of D variables.