mysql-native v1.2.0
API Reference Home: [This Version] [Latest Version] [Other Versions]
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
Name | Description |
---|---|
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
Name | Description |
---|---|
ColumnSpecialization
|
A struct to represent specializations of prepared statement parameters. |
Aliases
Name | Type | Description |
---|---|---|
CSN
|
ColumnSpecialization
|
A struct to represent specializations of prepared statement parameters. |