CollateExpression class final

An expression that changes the collation used to e.g. compare texts.

Created with StringExpressionOperators.collate.

Inheritance
Available extensions

Properties

collation → Collate
The collation to use.
final
hashCode → int
The hash code for this object.
no setteroverride
length → Expression<int>

Available on Expression<String>, provided by the StringExpressionOperators extension

Calls the sqlite function LENGTH on this string, which counts the number of characters in this string. Note that, in most sqlite installations, length may not support all unicode rules.
no setter
precedence → Precedence
The precedence of this expression. This can be used to automatically put parentheses around expressions as needed.
no setterinherited
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
source → Expression<String>
The inner text expression.
final
sqlType → SqlType<String>
Resolves the SqlType implementation describing the type of this expression.
no setteroverride

Methods

caseMatch<R extends Object>({required Map<Expression<String>, Expression<R>> when, Expression<R>? orElse}) → Expression<R>
A CASE WHEN construct using the current expression as a base.
inherited
cast<T2 extends Object>([SqlType<T2>? type]) → Expression<T2>
Generates a CAST(expression AS TYPE) expression.
inherited
collate(Collate collate) → Expression<String>

Available on Expression<String>, provided by the StringExpressionOperators extension

Uses the given collate sequence when comparing this column to other values.
compileWith(StatementCompiler compiler) → void
Compiles this component with the given StatementCompiler by invoking the relevant add method on it.
override
contains(String substring) → Expression<bool>

Available on Expression<String>, provided by the StringExpressionOperators extension

Whether this expression contains substring.
dartCast<T2 extends Object>({SqlType<T2>? customType}) → Expression<T2>
Casts this expression to an expression of D.
inherited
equals(String compare) → Expression<bool>
Whether this column is equal to the given value, which must have a fitting type. The compare value will be written as a variable using prepared statements, so there is no risk of an SQL-injection.
inherited
equalsExp(Expression<String> compare) → Expression<bool>
Whether this expression is equal to the given expression.
inherited
equalsNullable(String? compare) → Expression<bool>
Compares the value of this column to compare or null.
inherited
iif(Expression<bool> predicate, Expression<String> ifFalse) → Expression<String>
Evaluates to this if predicate is true, otherwise evaluates to ifFalse.
inherited
isExp(Expression<String> other) → Expression<bool>
Generates an IS expression in SQL, comparing this expression with the other expression.
inherited
isIn(Iterable<String> values) → Expression<bool>
An expression that is true if this resolves to any of the values in values.
inherited
isInExp(List<Expression<String>> expressions) → Expression<bool>
An expression that evaluates to true if this expression resolves to a value that one of the expressions resolve to as well.
inherited
isInQuery(BaseSelectStatement<BaseSelectStatement, dynamic> select) → Expression<bool>
An expression checking whether this is included in any row of the provided select statement.
inherited
isNotExp(Expression<String> other) → Expression<bool>
Generates an IS NOT expression in SQL, comparing this expression with the other expression.
inherited
isNotIn(Iterable<String> values) → Expression<bool>
An expression that is true if this does not resolve to any of the values in values.
inherited
isNotInExp(List<Expression<String>> expressions) → Expression<bool>
An expression that evaluates to true if this expression does not resolve to any value that the expressions resolve to.
inherited
isNotInQuery(BaseSelectStatement<BaseSelectStatement, dynamic> select) → Expression<bool>
An expression checking whether this is not included in any row of the provided select statement.
inherited
isNotNull() → Expression<bool>
Expression that is true if the inner expression resolves to a non-null value.
inherited
isNotValue(String value) → Expression<bool>
Generates an IS NOT expression in SQL, comparing this expression with the Dart value.
inherited
isNull() → Expression<bool>
Expression that is true if the inner expression resolves to a null value.
inherited
isValue(String value) → Expression<bool>
Generates an IS expression in SQL, comparing this expression with the Dart value.
inherited
like(String regex, {String? escapeChar}) → Expression<bool>

Available on Expression<String>, provided by the StringExpressionOperators extension

Whether this column matches the given pattern. For details on what patters are valid and how they are interpreted, check out this tutorial.
likeExp(Expression<String> regex, {Expression<String>? escape}) → Expression<bool>

Available on Expression<String>, provided by the StringExpressionOperators extension

Whether this column matches the given expression. For details on what patters are valid and how they are interpreted, check out this tutorial.
lower() → Expression<String>

Available on Expression<String>, provided by the StringExpressionOperators extension

Calls the sqlite function LOWER on this string. Please note that, in most sqlite installations, this only affects ascii chars.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
nullIf(Expression<String> matcher) → Expression<String>
Returns null if matcher is equal to this expression, this otherwise.
inherited
substr(int start, [int? length]) → Expression<String>

Available on Expression<String>, provided by the StringExpressionOperators extension

Calls the substr function on this string.
substrExpr(Expression<int> start, [Expression<int>? length]) → Expression<String>

Available on Expression<String>, provided by the StringExpressionOperators extension

Calls the substr function with arbitrary expressions as arguments.
toString() → String
A string representation of this object.
inherited
trim() → Expression<String>

Available on Expression<String>, provided by the StringExpressionOperators extension

Removes spaces from both ends of this string.
trimLeft() → Expression<String>

Available on Expression<String>, provided by the StringExpressionOperators extension

Removes spaces from the beginning of this string.
trimRight() → Expression<String>

Available on Expression<String>, provided by the StringExpressionOperators extension

Removes spaces from the end of this string.
upper() → Expression<String>

Available on Expression<String>, provided by the StringExpressionOperators extension

Calls the sqlite function UPPER on this string. Please note that, in most sqlite installations, this only affects ascii chars.
variable(String? value) → Variable<String>
Creates a variable that is guaranteed to have the same SqlType as this.
inherited

Operators

operator +(Expression<String> other) → Expression<String>

Available on Expression<String>, provided by the StringExpressionOperators extension

Performs a string concatenation in sql by appending other to this.
operator ==(Object other) → bool
The equality operator.
override