select method

Future<SqlDatabaseResult> select(
  1. DatabaseDriver conn,
  2. Sqler query
)

Executes a SELECT query on the table. Executes the provided query to retrieve data from the table. The query should be constructed using the Sqler query builder. Parameters:

  • conn - The active MySQL database connection
  • query - A Sqler object representing the SELECT query to execute Returns a MySqlResult containing the query results and metadata. Example:
var query = Sqler()
  ..from(QField('users'))
  ..selects([QSelect('*')])
  ..where(WhereOne(QField('active'), QO.EQ, QVar(true)));
var result = await table.select(conn, query);

Implementation

Future<SqlDatabaseResult> select(DatabaseDriver conn, Sqler query) async {
  return conn.execute(query);
}