executeSelect<T> method
Executes an SQL SELECT query and returns the result as a SQLResponseOf object.
The tableName
parameter specifies the name of the table to query.
The columns
parameter is a list of column names to select.
The where
parameter is a JsonRow object representing the WHERE clause.
The nullAsBlank
parameter specifies whether to treat null values as blank.
The and
parameter specifies whether to use the AND operator in the WHERE clause.
The transform
parameter is an optional function to transform the query result.
Implementation
Future<SQLResponseOf<T>> executeSelect<T>(
{required String tableName, List<String> columns = const [], JsonRow where = const {}, bool nullAsBlank = false, bool and = true, T Function(dynamic)? transform}) {
return executeSQL(
dataSetType: "table",
transform: transform,
sql: where.asSelectWhereCommand(
tableName: tableName,
columns: columns,
nullAsBlank: nullAsBlank,
quoteChar: quoteChar,
dataBaseProvider: dataBaseProvider,
and: and,
),
);
}