select<T extends Record> method

Query<T> select<T extends Record>(
  1. T projectionBuilder(
    1. Expr<A> a,
    2. Expr<B> b,
    3. Expr<C> c,
    4. Expr<D> d,
    5. Expr<E> e,
    6. Expr<F> f,
    )
)

Create a projection of this Query using SELECT clause.

The projectionBuilder must return a Record where all the values are Expr objects. If something else is returned you will get a Query object which doesn't have any methods!

All methods and properties on Query<T> are extension methods and they are only defined for records T where all the values are Expr objects.

Implementation

Query<T> select<T extends Record>(
  T Function(Expr<A> a, Expr<B> b, Expr<C> c, Expr<D> d, Expr<E> e, Expr<F> f)
  projectionBuilder,
) {
  final (handle, projection) = _build(projectionBuilder);
  return Query._(
    _context,
    projection,
    (e) => SelectFromClause._(_from(_expressions.toList()), handle, e),
  );
}