MssqlTypedColumn<T> class

A column that knows its Dart type.

Generated code uses these columns to constrain operators to the column's Dart type. For example, Users.name.gt(5) fails to compile. Code written against the untyped core remains compatible with generated columns.

Instance comparison methods take precedence over the untyped extensions on MssqlExpression, making invalid operands compile-time errors.

Inheritance
Implementers
Available extensions

Constructors

MssqlTypedColumn(String quoted, String name, {MssqlColumnType? columnType})
A column written out in full. Kept for hand-written schemas and for the untyped builder; generated code uses MssqlTypedColumn.of.
MssqlTypedColumn.of({required MssqlSourceRef source, required String name, required String quotedName, required MssqlColumnType columnType})
A generated column: it belongs to a source, and it knows its SQL type.

Properties

codec → MssqlTypeCodec<Object?>?
The codec for this column, built once.
latefinal
columnType → MssqlColumnType?
What the column is in SQL, or null for a hand-written column that never said.
final
hashCode int
The hash code for this object.
no setterinherited
isNullable bool
Whether SQL says this column can be null.
no setter
name String
The column's own name, without any qualifier.
finalinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
source MssqlSourceRef?
The source this column belongs to, or null when it was written in full.
finalinherited

Methods

as(String alias) MssqlAliased

Available on MssqlExpression, provided by the MssqlExpressionOperators extension

Gives this expression a result alias.
asc({MssqlNulls? nulls}) MssqlOrder

Available on MssqlExpression, provided by the MssqlExpressionOperators extension

Orders by this expression, ascending.
at(MssqlSourceRef source) MssqlTypedColumn<T>
This column, seen through another source.
between(T lower, T upper) MssqlCondition
between(Object? lower, Object? upper) MssqlCondition

Available on MssqlExpression, provided by the MssqlExpressionOperators extension

betweenColumns(String lower, String upper) MssqlCondition

Available on MssqlExpression, provided by the MssqlExpressionOperators extension

BETWEEN two other columns rather than two values.
compile(MssqlParameterAllocator parameters, MssqlDialect dialect) String
Writes this expression's SQL, binding any values through parameters.
inherited
desc({MssqlNulls? nulls}) MssqlOrder

Available on MssqlExpression, provided by the MssqlExpressionOperators extension

Orders by this expression, descending.
eq(T value) MssqlCondition
Typed comparisons. The untyped versions on MssqlExpression stay available for untyped columns; these shadow them with a narrower operand.
eq(Object? value) MssqlCondition

Available on MssqlExpression, provided by the MssqlExpressionOperators extension

eqCol(String identifier) MssqlCondition

Available on MssqlExpression, provided by the MssqlExpressionOperators extension

Compares this expression to another column rather than to a value.
eqExpr(MssqlExpression other) MssqlCondition

Available on MssqlExpression, provided by the MssqlExpressionOperators extension

Compares this expression to another expression.
gt(T value) MssqlCondition
gt(Object? value) MssqlCondition

Available on MssqlExpression, provided by the MssqlExpressionOperators extension

gte(T value) MssqlCondition
gte(Object? value) MssqlCondition

Available on MssqlExpression, provided by the MssqlExpressionOperators extension

inList(Iterable<T> values, {MssqlEmptyIn? onEmpty}) MssqlCondition
inList(Iterable<Object?> values) MssqlCondition

Available on MssqlExpression, provided by the MssqlExpressionOperators extension

inQuery(MssqlSelectQuery query) MssqlCondition

Available on MssqlExpression, provided by the MssqlSubqueryExpressionOperators extension

isNotNull() MssqlCondition

Available on MssqlExpression, provided by the MssqlExpressionOperators extension

isNull() MssqlCondition

Available on MssqlExpression, provided by the MssqlExpressionOperators extension

lt(Object? value) MssqlCondition

Available on MssqlExpression, provided by the MssqlExpressionOperators extension

lt(T value) MssqlCondition
lte(Object? value) MssqlCondition

Available on MssqlExpression, provided by the MssqlExpressionOperators extension

lte(T value) MssqlCondition
ne(T value) MssqlCondition
ne(Object? value) MssqlCondition

Available on MssqlExpression, provided by the MssqlExpressionOperators extension

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
notBetween(Object? lower, Object? upper) MssqlCondition

Available on MssqlExpression, provided by the MssqlExpressionOperators extension

notBetweenColumns(String lower, String upper) MssqlCondition

Available on MssqlExpression, provided by the MssqlExpressionOperators extension

notInList(Iterable<Object?> values) MssqlCondition

Available on MssqlExpression, provided by the MssqlExpressionOperators extension

notInList(Iterable<T> values, {MssqlEmptyIn? onEmpty}) MssqlCondition
notInQuery(MssqlSelectQuery query) MssqlCondition

Available on MssqlExpression, provided by the MssqlSubqueryExpressionOperators extension

operand(T value, String method) MssqlExpression
Binds value with this column's SQL type.
toString() String
A string representation of this object.
inherited
whereAfterToday() MssqlCondition

Available on MssqlExpression, provided by the MssqlExpressionOperators extension

whereBeforeToday() MssqlCondition

Available on MssqlExpression, provided by the MssqlExpressionOperators extension

whereDate(Object? value, [MssqlOperator operator = MssqlOperator.eq]) MssqlCondition

Available on MssqlExpression, provided by the MssqlExpressionOperators extension

Compares the date alone, so the whole day matches rather than midnight.
whereDay(int value, [MssqlOperator operator = MssqlOperator.eq]) MssqlCondition

Available on MssqlExpression, provided by the MssqlExpressionOperators extension

whereFuture() MssqlCondition

Available on MssqlExpression, provided by the MssqlExpressionOperators extension

whereMonth(int value, [MssqlOperator operator = MssqlOperator.eq]) MssqlCondition

Available on MssqlExpression, provided by the MssqlExpressionOperators extension

whereNowOrFuture() MssqlCondition

Available on MssqlExpression, provided by the MssqlExpressionOperators extension

whereNowOrPast() MssqlCondition

Available on MssqlExpression, provided by the MssqlExpressionOperators extension

wherePast() MssqlCondition

Available on MssqlExpression, provided by the MssqlExpressionOperators extension

Strictly earlier than now, again by the server's clock.
whereTime(Object? value, [MssqlOperator operator = MssqlOperator.eq]) MssqlCondition

Available on MssqlExpression, provided by the MssqlExpressionOperators extension

Compares the time of day, with the date discarded.
whereToday() MssqlCondition

Available on MssqlExpression, provided by the MssqlExpressionOperators extension

The date part equals today, as the server reckons it.
whereTodayOrAfter() MssqlCondition

Available on MssqlExpression, provided by the MssqlExpressionOperators extension

whereTodayOrBefore() MssqlCondition

Available on MssqlExpression, provided by the MssqlExpressionOperators extension

whereYear(int value, [MssqlOperator operator = MssqlOperator.eq]) MssqlCondition

Available on MssqlExpression, provided by the MssqlExpressionOperators extension

Operators

operator ==(Object other) bool
The equality operator.
inherited