Field<T> class
final
A writable column expression that can create mutation assignments.
- Inheritance
- Available extensions
Properties
-
codec
→ Codec<
T> -
Encodes parameters and decodes this expression's result column.
finalinherited
-
definition
→ Column<
T> -
The column's name, codec and physical constraints.
finalinherited
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- table → TableRef
-
The owning table occurrence, used to validate query scope.
finalinherited
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.
inherited
-
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 -
change(
Change< T> change) → List<Assignment> -
Available on Field<
Omits unchanged fields and builds assignments for the other cases.T> , provided by the ChangeField 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.
inherited
-
cursor(
T value, {bool descending = false, NullOrder? nulls}) → CursorTerm -
Builds a typed keyset boundary from this expression and a row value.
inherited
-
decrement(
T amount) → Assignment -
Available on Field<
Subtracts a bound amount from the stored value.T> , provided by the NumericField extension -
defaultValue(
) → Assignment - Requests the database default rather than a Dart client default.
-
desc(
{NullOrder? nulls}) → OrderTerm -
Orders descending, optionally specifying where NULL values appear.
inherited
-
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.inherited -
equals(
Expr< T> other) → Expr<bool?> -
Compares two SQL expressions using
=and SQL NULL semantics.inherited -
gt(
T value) → Expr< bool?> -
Tests whether this value is greater than the bound value.
inherited
-
gte(
T value) → Expr< bool?> -
Tests whether this value is greater than or equal to the bound value.
inherited
-
increment(
T amount) → Assignment -
Available on Field<
Adds a bound amount to the stored value.T> , provided by the NumericField extension -
isIn(
Iterable< T> values) → Expr<bool?> -
Tests membership in separately bound values; an empty list is false.
inherited
-
isInQuery<
F extends Fields> (Query< T, F> query) → Expr<bool?> -
Tests membership in a subquery selecting one SQL expression.
inherited
-
isNotNull(
) → Expr< bool> -
Tests for a non-NULL value, yielding a non-null boolean.
inherited
-
isNull(
) → Expr< bool> -
Tests for SQL NULL, yielding a non-null boolean.
inherited
-
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.
inherited
-
lte(
T value) → Expr< bool?> -
Tests whether this value is less than or equal to the bound value.
inherited
-
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.
inherited
-
min(
) → Expr< T?> -
Selects the minimum value, or null for an empty group.
inherited
-
minus(
T n) → Expr< T> -
Available on Expr<
Subtracts a bound value in SQL.T> , provided by the NumericExpression extension -
minus(
Decimal n) → Expr< T> -
Available on Expr<
Subtracts an exactly encoded decimal value.T> , provided by the DecimalExpression 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.inherited -
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.
inherited
-
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 -
set(
T value) → Assignment - Assigns a bound value, including NULL when the field is nullable.
-
setExpression(
Expr< T> expression) → Assignment - Assigns a SQL expression with the same Dart value type.
-
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