StringExpressionOperators extension

Defines methods that operate on a column storing String values.

on

Properties

length Expression<int>
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

Methods

collate(Collate collate) Expression<String>
Uses the given collate sequence when comparing this column to other values.
contains(String substring) Expression<bool>
Whether this expression contains substring.
like(String regex) Expression<bool>
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<bool>
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>
Calls the sqlite function LOWER on this string. Please note that, in most sqlite installations, this only affects ascii chars.
regexp(String regex, {bool multiLine = false, bool caseSensitive = true, bool unicode = false, bool dotAll = false}) Expression<bool>
Matches this string against the regular expression in regex.
substr(int start, [int? length]) Expression<String>
Calls the substr function on this string.
substrExpr(Expression<int> start, [Expression<int>? length]) Expression<String>
Calls the substr function with arbitrary expressions as arguments.
trim() Expression<String>
Removes spaces from both ends of this string.
trimLeft() Expression<String>
Removes spaces from the beginning of this string.
trimRight() Expression<String>
Removes spaces from the end of this string.
upper() Expression<String>
Calls the sqlite function UPPER on this string. Please note that, in most sqlite installations, this only affects ascii chars.

Operators

operator +(Expression<String> other) Expression<String>
Performs a string concatenation in sql by appending other to this.