MssqlExistsValue class

EXISTS (SELECT ...) as a value, for a projection rather than a WHERE.

SQL Server has no boolean expression: EXISTS is a predicate and a predicate cannot be selected, so SELECT EXISTS (…) is a syntax error. A CASE around it is the only way to project the answer, and the CAST to bit is what makes the result decode as a Dart bool rather than as the 1 or 0 the CASE produces.

Still EXISTS inside, not COUNT(*) > 0: the server stops at the first matching row rather than counting all of them.

Inheritance
Implemented types
Available extensions
Annotations
  • @immutable

Constructors

MssqlExistsValue(MssqlSelectQuery query, {bool negated = false})
const

Properties

hashCode → int
The hash code for this object.
no setterinherited
negated → bool
final
query → MssqlSelectQuery
final
resultType → MssqlColumnType
bit, and never null: the CASE covers both branches.
no setteroverride
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited

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.
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.
override
desc({MssqlNulls? nulls}) → MssqlOrder

Available on MssqlExpression, provided by the MssqlExpressionOperators extension

Orders by this expression, descending.
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(Object? value) → MssqlCondition

Available on MssqlExpression, provided by the MssqlExpressionOperators extension

gte(Object? value) → MssqlCondition

Available on MssqlExpression, provided by the MssqlExpressionOperators extension

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

lte(Object? value) → MssqlCondition

Available on MssqlExpression, provided by the MssqlExpressionOperators extension

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

notInQuery(MssqlSelectQuery query) → MssqlCondition

Available on MssqlExpression, provided by the MssqlSubqueryExpressionOperators extension

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