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.

This method will throw if any column type is incompatible with the corresponding D variable.

Unlike the other query functions, queryRowTuple will throw mysql.exceptions.MySQLException if the result set is empty (and thus the reference variables passed in cannot be filled).

If the SQL command does not produce a result set (such as INSERT/CREATE/etc), then mysql.exceptions.MySQLNoResultRecievedException will be thrown. Use exec instead for such commands.

Use this method when you are not going to be using the same command repeatedly and you are CERTAIN all the data you're sending is properly escaped. Otherwise consider using mysql.prepared.Prepared.

void
queryRowTuple
(
T...
)
(,
string sql
,
ref T args
)

Parameters

conn Connection

An open Connection to the database.

sql string

The SQL command to be run.

args T

The variables, taken by reference, to receive the values.

Params: args = A tuple of D variables to receive the results.

Meta