Expr<T> class
A typed SQL expression that can also be selected as a result.
Operators build SQL without executing it. The codec controls bound values and result decoding; nullable predicates retain SQL three-valued logic.
- Inheritance
- Implementers
- Available extensions
Properties
Methods
-
and(
Expr< bool?> other) → Expr<bool?> -
Available on Expr<
Requires both predicates to be true.bool?> , provided by the Predicate extension -
asc(
{NullOrder? nulls}) → OrderTerm - Orders ascending, optionally specifying where NULL values appear.
-
average(
{required int scale, DecimalRounding rounding = DecimalRounding.exact}) → Expr< Decimal?> -
Available on Expr<
Averages non-null inputs, rounding once at the requested result scale. Empty/all-null input returns null; the default rejects lost digits.T> , provided by the DecimalExpression extension -
average(
) → Expr< double?> -
Available on Expr<
Computes a floating-point SQL average, or null for an empty group.T> , provided by the NumericExpression extension -
constrained(
int precision, int scale) → Expr< T> -
Available on Expr<
Rounds and checks a decimal against the requested precision and scale.T> , provided by the DecimalExpression extension -
count(
{bool distinct = false}) → Expr< int> - Counts non-NULL values, optionally counting only distinct values.
-
cursor(
T value, {bool descending = false, NullOrder? nulls}) → CursorTerm - Builds a typed keyset boundary from this expression and a row value.
-
desc(
{NullOrder? nulls}) → OrderTerm - Orders descending, optionally specifying where NULL values appear.
-
divide(
Decimal divisor, {required int scale, DecimalRounding rounding = DecimalRounding.exact}) → Expr< T> -
Available on Expr<
Divides in SQL to an explicit scale without a floating-point intermediate.T> , provided by the DecimalExpression extension -
divideExpression(
Expr< Decimal?> divisor, {required int scale, DecimalRounding rounding = DecimalRounding.exact}) → Expr<Decimal?> -
Available on Expr<
Divides two SQL expressions. A null operand produces null.T> , provided by the DecimalExpression extension -
eq(
T value) → Expr< bool?> -
Compares with a bound value; null produces SQL
IS NULL. -
equals(
Expr< T> other) → Expr<bool?> -
Compares two SQL expressions using
=and SQL NULL semantics. -
gt(
T value) → Expr< bool?> - Tests whether this value is greater than the bound value.
-
gte(
T value) → Expr< bool?> - Tests whether this value is greater than or equal to the bound value.
-
isIn(
Iterable< T> values) → Expr<bool?> - Tests membership in separately bound values; an empty list is false.
-
isInQuery<
F extends Fields> (Query< T, F> query) → Expr<bool?> - Tests membership in a subquery selecting one SQL expression.
-
isNotNull(
) → Expr< bool> - Tests for a non-NULL value, yielding a non-null boolean.
-
isNull(
) → Expr< bool> - Tests for SQL NULL, yielding a non-null boolean.
-
like(
String pattern) → Expr< bool?> -
Available on Expr<
Matches a bound SQL LIKE pattern;String> , provided by the TextExpression extension%and_remain wildcards. -
lower(
) → Expr< String> -
Available on Expr<
Converts text to lowercase using database rules.String> , provided by the TextExpression extension -
lt(
T value) → Expr< bool?> - Tests whether this value is less than the bound value.
-
lte(
T value) → Expr< bool?> - Tests whether this value is less than or equal to the bound value.
-
map<
R> (R mapper(T)) → Selection< R> -
Maps each decoded value in Dart, preserving the source SQL projection.
inherited
-
max(
) → Expr< T?> - Selects the maximum value, or null for an empty group.
-
min(
) → Expr< T?> - Selects the minimum value, or null for an empty group.
-
minus(
Decimal n) → Expr< T> -
Available on Expr<
Subtracts an exactly encoded decimal value.T> , provided by the DecimalExpression extension -
minus(
T n) → Expr< T> -
Available on Expr<
Subtracts a bound value in SQL.T> , provided by the NumericExpression extension -
minusExpression(
Expr< Decimal?> other) → Expr<Decimal?> -
Available on Expr<
Subtracts another decimal SQL expression.T> , provided by the DecimalExpression extension -
ne(
T value) → Expr< bool?> -
Compares with a bound value; null produces SQL
IS NOT NULL. -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
not(
) → Expr< bool?> -
Available on Expr<
Negates this predicate; SQL NULL remains unknown.bool?> , provided by the Predicate extension -
or(
Expr< bool?> other) → Expr<bool?> -
Available on Expr<
Requires either predicate to be true.bool?> , provided by the Predicate extension -
over(
{List< Expr< partitionBy = const [], List<Object?> >OrderTerm> orderBy = const [], WindowFrame? frame}) → Expr<T> - Turns an aggregate into a window expression.
-
plus(
Decimal n) → Expr< T> -
Available on Expr<
Adds an exactly encoded decimal value.T> , provided by the DecimalExpression extension -
plus(
T n) → Expr< T> -
Available on Expr<
Adds a bound value in SQL.T> , provided by the NumericExpression extension -
plusExpression(
Expr< Decimal?> other) → Expr<Decimal?> -
Available on Expr<
Adds another decimal SQL expression.T> , provided by the DecimalExpression extension -
rounded(
int scale, {DecimalRounding rounding = DecimalRounding.exact}) → Expr< T> -
Available on Expr<
Rounds in SQL; DecimalRounding.exact rejects any lost nonzero digits.T> , provided by the DecimalExpression extension -
sum(
{bool distinct = false}) → Expr< Decimal?> -
Available on Expr<
Sums decimal values exactly, returning null for an empty group.T> , provided by the DecimalExpression extension -
sum(
) → Expr< T?> -
Available on Expr<
Sums values, returning null for an empty group.T> , provided by the NumericExpression extension -
times(
Decimal n) → Expr< T> -
Available on Expr<
Multiplies by an exactly encoded decimal value.T> , provided by the DecimalExpression extension -
times(
T n) → Expr< T> -
Available on Expr<
Multiplies by a bound value in SQL.T> , provided by the NumericExpression extension -
timesExpression(
Expr< Decimal?> other) → Expr<Decimal?> -
Available on Expr<
Multiplies by another decimal SQL expression.T> , provided by the DecimalExpression extension -
toString(
) → String -
A string representation of this object.
inherited
-
upper(
) → Expr< String> -
Available on Expr<
Converts text to uppercase using database rules.String> , provided by the TextExpression extension -
withPrecision(
int digits) → Expr< T> -
Available on Expr<
Rounds to the requested fractional-second digits (0 through 6).T> , provided by the TimeExpression extension -
withPrecision(
int digits) → Expr< T> -
Available on Expr<
Rounds to the requested fractional-second digits (0 through 6).T> , provided by the InstantExpression extension -
withPrecision(
int digits) → Expr< T> -
Available on Expr<
Rounds to the requested fractional-second digits (0 through 6).T> , provided by the LocalDateTimeExpression extension
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited