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
- Implemented types
-
- Operand<
T>
- Operand<
- Implementers
- Available extensions
Properties
Methods
-
asc(
{NullOrder? nulls}) → OrderTerm - Orders ascending, optionally specifying where NULL values appear.
-
average(
) → Expr< double?> -
Available on Expr<
Computes a floating-point SQL average, or null for an empty group.T> , provided by the NumericExpression extension -
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 -
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 -
contains(
String text) → Expr< bool?> -
Available on Expr<
Matches literal text anywhere, escaping LIKE wildcardsT> , provided by the TextExpression extension%,_and!. -
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 -
endsWith(
String text) → Expr< bool?> -
Available on Expr<
Matches a literal suffix; LIKE wildcards inT> , provided by the TextExpression extensiontexthave no special meaning. -
eq(
Operand< T> other) → Expr<bool?> -
Compares with a value or SQL expression using
=. -
gt(
Operand< T> other) → Expr<bool?> -
Tests whether this expression is greater than
other. -
gte(
Operand< T> other) → Expr<bool?> -
Tests whether this expression is greater than or equal to
other. -
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;T> , provided by the TextExpression extension%and_remain wildcards. -
lower(
) → Expr< T> -
Available on Expr<
Converts text to lowercase using database rules, preserving nullability.T> , provided by the TextExpression extension -
lt(
Operand< T> other) → Expr<bool?> -
Tests whether this expression is less than
other. -
lte(
Operand< T> other) → Expr<bool?> -
Tests whether this expression is less than or equal to
other. -
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(
Operand< T> other) → Expr<bool?> -
Compares with a value or SQL expression using
<>. -
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 -
over(
{List< Expr< partitionBy = const [], List<Object?> >OrderTerm> orderBy = const [], WindowFrame? frame}) → Expr<T> - Turns an aggregate into a window expression.
-
plus(
T n) → Expr< T> -
Available on Expr<
Adds a bound value in SQL.T> , provided by the NumericExpression extension -
plus(
Decimal n) → Expr< T> -
Available on Expr<
Adds an exactly encoded decimal value.T> , provided by the DecimalExpression 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 -
startsWith(
String text) → Expr< bool?> -
Available on Expr<
Matches a literal prefix; LIKE wildcards inT> , provided by the TextExpression extensiontexthave no special meaning. -
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(
T n) → Expr< T> -
Available on Expr<
Multiplies by a bound value in SQL.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 -
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< T> -
Available on Expr<
Converts text to uppercase using database rules, preserving nullability.T> , 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 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 -
withPrecision(
int digits) → Expr< T> -
Available on Expr<
Rounds to the requested fractional-second digits (0 through 6).T> , provided by the TimeExpression extension
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited