select<S extends Selection<T>, T> method

SelectedQuery<T, F, S> select<S extends Selection<T>, T>(
  1. S selection(
    1. F
    )
)

Chooses selected SQL cells and the application result decoded from them.

Filters and ordering still use source F. Preserve the concrete Projection return type in helpers that export named SQL output fields.

Implementation

SelectedQuery<T, F, S> select<S extends Selection<T>, T>(
  S Function(F) selection,
) {
  final selected = selection(queryFields);
  return SelectedQuery<T, F, S>.internal(
    Query<T, F>.internal(database, queryFields, queryState, selected),
    selected,
  );
}