executeSelect<T> method

Future<SQLResponseOf<T>> executeSelect<T>({
  1. required String tableName,
  2. List<String> columns = const [],
  3. JsonRow where = const {},
  4. bool nullAsBlank = false,
  5. bool and = true,
  6. T transform(
    1. dynamic
    )?,
})

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,
    ),
  );
}