customSelectMapped<T> method

Selectable<T> customSelectMapped<T>({
  1. required String query,
  2. required T Function(RawRow) createMapper(
    1. RawResultSet
    ),
  3. List<Variable<Object>> variables = const [],
  4. Set<SchemaEntityWithResultSet<Object, ResultSet<Object, dynamic>>> readsFrom = const {},
  5. bool isReadOnly = true,
})

A variant of customSelect that uses createMapper to obtain a select statement for which rows can be mapped to a custom Dart type.

Implementation

Selectable<T> customSelectMapped<T>({
  required String query,
  required T Function(RawRow) Function(RawResultSet) createMapper,
  List<Variable> variables = const [],
  Set<SchemaEntityWithResultSet> readsFrom = const {},
  bool isReadOnly = true,
}) {
  return CustomSelectStatement(
    query,
    Variable.resolveValues(dialect, variables),
    readsFrom,
    createMapper,
    this,
    isReadOnly,
  );
}