BaseColumnBuilder<T extends Object>
extension type
Common definitions shared between regular columns (ColumnBuilders) and virtual columns (VirtualColumnBuilder).
- on
-
- SchemaColumn<
T>
- SchemaColumn<
- Implemented types
-
- SchemaColumn<
T>
- SchemaColumn<
- Available extensions
Properties
-
date
→ Expression<
String> -
Available on Expression<
Formats this datetime in the formatDateTime> , provided by the DateTimeExpressions extensionyear-month-day.no setter -
datetime
→ Expression<
String> -
Available on Expression<
Formats this datetime in the formatDateTime> , provided by the DateTimeExpressions extensionyear-month-day hour:minute:second.no setter -
day
→ Expression<
int> -
Available on Expression<
Extracts the day fromDateTime> , provided by the DateTimeExpressions extensionthisdatetime expression.no setter - hashCode → int
-
The hash code for this object.
no setterinherited
-
hour
→ Expression<
int> -
Available on Expression<
Extracts the hour fromDateTime> , provided by the DateTimeExpressions extensionthisdatetime expression.no setter -
julianday
→ Expression<
double> -
Available on Expression<
Formats this datetime in the Julian day format - a fractional number of days since noon in Greenwich on November 24, 4714 B.C.DateTime> , provided by the DateTimeExpressions extensionno setter -
length
→ Expression<
int> -
Available on Expression<
The length of this blob, in bytes.Uint8List> , provided by the BlobExpressionOperators extensionno setter -
length
→ Expression<
int> -
Available on Expression<
Calls the sqlite functionString> , provided by the StringExpressionOperators extensionLENGTHonthisstring, which counts the number of characters in this string. Note that, in most sqlite installations, length may not support all unicode rules.no setter -
minute
→ Expression<
int> -
Available on Expression<
Extracts the minute fromDateTime> , provided by the DateTimeExpressions extensionthisdatetime expression.no setter -
month
→ Expression<
int> -
Available on Expression<
Extracts the month fromDateTime> , provided by the DateTimeExpressions extensionthisdatetime expression.no setter - name → String
-
The raw name of the column in SQL (without any escaping quotes).
finalinherited
-
owningResultSet
↔ ResultSet<
Object, ResultSet< Object, dynamic> > -
The ResultSet that this column is part of.
getter/setter pairinherited
- 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
-
second
→ Expression<
int> -
Available on Expression<
Extracts the second fromDateTime> , provided by the DateTimeExpressions extensionthisdatetime expression.no setter -
sqlType
→ SqlType<
T> -
The SQL type of this column.
finalinherited
-
time
→ Expression<
String> -
Available on Expression<
Formats this datetime in the formatDateTime> , provided by the DateTimeExpressions extensionhour:minute:second.no setter -
unixepoch
→ Expression<
int> -
Available on Expression<
Formats this datetime as a unix timestamp - the number of seconds since 1970-01-01 00:00:00 UTC.DateTime> , provided by the DateTimeExpressions extensionno setter -
year
→ Expression<
int> -
Available on Expression<
Extracts the year fromDateTime> , provided by the DateTimeExpressions extensionthisdatetime expression.no setter
Methods
-
abs(
) → Expression< BigInt> -
Available on Expression<
Calculates the absolute value of this number.BigInt> , provided by the ArithmeticBigIntExpr extension -
abs(
) → Expression< DT> -
Available on Expression<
Calculates the absolute value of this number.DT> , provided by the ArithmeticExpr extension -
avg(
{Expression< bool> ? filter}) → Expression<DateTime> -
Available on Expression<
Return the average of all non-null values in this group. To only consider rows matching a predicate, you can set the optionalDateTime> , provided by the DateTimeAggregate extensionfilter. Note thatfilteris only available from sqlite 3.30, released on 2019-10-04. Most devices will use an older sqlite version. -
avg(
{Expression< bool> ? filter}) → Expression<double> -
Available on Expression<
Return the average of all non-null values in this group.DT> , provided by the ArithmeticAggregates extension -
avg(
{Expression< bool> ? filter}) → Expression<double> -
Available on Expression<
Return the average of all non-null values in this group.BigInt> , provided by the BigIntAggregates extension -
bitwiseAnd(
Expression< int> other) → Expression<int> -
Available on Expression<
Returns the bitwise-and operation betweenint> , provided by the BitwiseInt extensionthisandother. -
bitwiseAnd(
Expression< BigInt> other) → Expression<BigInt> -
Available on Expression<
Returns the bitwise-and operation betweenBigInt> , provided by the BitwiseBigInt extensionthisandother. -
bitwiseOr(
Expression< int> other) → Expression<int> -
Available on Expression<
Returns the bitwise-or operation betweenint> , provided by the BitwiseInt extensionthisandother. -
bitwiseOr(
Expression< BigInt> other) → Expression<BigInt> -
Available on Expression<
Returns the bitwise-or operation betweenBigInt> , provided by the BitwiseBigInt extensionthisandother. -
call(
) → Column< T> - Turns this column builder into a column. This method won't actually be called in your code. Instead, the generator will take a look at your source code to figure out your table structure.
-
caseMatch<
R extends Object> ({required Map< Expression< when, Expression<T> , Expression<R> >R> ? orElse}) → Expression<R> -
A
CASE WHENconstruct 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<
Uses the givenString> , provided by the StringExpressionOperators extensioncollatesequence when comparing this column to other values. -
compileWith(
StatementCompiler compiler) → void -
Compiles this component with the given StatementCompiler by invoking the
relevant
addmethod on it.inherited -
contains(
String substring) → Expression< bool> -
Available on Expression<
Whether this expression containsString> , provided by the StringExpressionOperators extensionsubstring. -
count(
{bool distinct = false, Expression< bool> ? filter}) → Expression<int> -
Available on Expression<
Returns how often this expression is non-null in the current group.DT> , provided by the BaseAggregate extension -
dartCast<
T2 extends Object> ({SqlType< T2> ? customType}) → Expression<T2> -
Casts this expression to an expression of
D.inherited -
equals(
T compare) → Expression< bool> -
Whether this column is equal to the given value, which must have a fitting
type. The
comparevalue will be written as a variable using prepared statements, so there is no risk of an SQL-injection.inherited -
equalsExp(
Expression< T> compare) → Expression<bool> -
Whether this expression is equal to the given expression.
inherited
-
equalsNullable(
T? compare) → Expression< bool> -
Compares the value of this column to
compareornull.inherited -
groupConcat(
{String separator = ',', bool distinct = false, Expression< bool> ? filter, OrderBy? orderBy}) → Expression<String> -
Available on Expression<
Returns the concatenation of all non-null values in the current group, joined by theDT> , provided by the BaseAggregate extensionseparator. -
iif(
Expression< bool> predicate, Expression<T> ifFalse) → Expression<T> -
Evaluates to
thisifpredicateis true, otherwise evaluates toifFalse.inherited -
isBetween(
Expression< DT> lower, Expression<DT> higher, {bool not = false}) → BetweenExpression -
Available on Expression<
Returns an expression evaluating to true if this expression is betweenDT> , provided by the ComparableExpr extensionlowerandhigher(both inclusive). -
isBetweenValues(
DT lower, DT higher, {bool not = false}) → BetweenExpression -
Available on Expression<
Returns an expression evaluating to true if this expression is betweenDT> , provided by the ComparableExpr extensionlowerandhigher(both inclusive). -
isExp(
Expression< T> other) → Expression<bool> -
Generates an
ISexpression in SQL, comparing this expression with theotherexpression.inherited -
isGreaterOrEqual(
Expression< DT> other) → Expression<bool> -
Available on Expression<
Returns an expression that is true if this expression is greater than or equal to he other expression.DT> , provided by the ComparableExpr extension -
isGreaterOrEqualValue(
DT other) → Expression< bool> -
Available on Expression<
Returns an expression that is true if this expression is greater than or equal to he other value.DT> , provided by the ComparableExpr extension -
isGreaterThan(
Expression< DT> other) → Expression<bool> -
Available on Expression<
Returns an expression that is true if this expression is strictly greater than the other expression.DT> , provided by the ComparableExpr extension -
isGreaterThanValue(
DT other) → Expression< bool> -
Available on Expression<
Returns an expression that is true if this expression is strictly greater than the other value.DT> , provided by the ComparableExpr extension -
isIn(
Iterable< T> values) → Expression<bool> -
An expression that is true if
thisresolves to any of the values invalues.inherited -
isInExp(
List< Expression< expressions) → Expression<T> >bool> -
An expression that evaluates to
trueif this expression resolves to a value that one of theexpressionsresolve to as well.inherited -
isInQuery(
BaseSelectStatement< BaseSelectStatement, dynamic> select) → Expression<bool> -
An expression checking whether
thisis included in any row of the providedselectstatement.inherited -
isLessOrEqual(
Expression< DT> other) → Expression<bool> -
Available on Expression<
Returns an expression that is true if this expression is less than or equal to he other expression.DT> , provided by the ComparableExpr extension -
isLessOrEqualValue(
DT other) → Expression< bool> -
Available on Expression<
Returns an expression that is true if this expression is less than or equal to he other value.DT> , provided by the ComparableExpr extension -
isLessThan(
Expression< DT> other) → Expression<bool> -
Available on Expression<
Returns an expression that is true if this expression is strictly less than the other expression.DT> , provided by the ComparableExpr extension -
isLessThanValue(
DT other) → Expression< bool> -
Available on Expression<
Returns an expression that is true if this expression is strictly smaller than the other value.DT> , provided by the ComparableExpr extension -
isNotExp(
Expression< T> other) → Expression<bool> -
Generates an
IS NOTexpression in SQL, comparing this expression with theotherexpression.inherited -
isNotIn(
Iterable< T> values) → Expression<bool> -
An expression that is true if
thisdoes not resolve to any of the values invalues.inherited -
isNotInExp(
List< Expression< expressions) → Expression<T> >bool> -
An expression that evaluates to
trueif this expression does not resolve to any value that theexpressionsresolve to.inherited -
isNotInQuery(
BaseSelectStatement< BaseSelectStatement, dynamic> select) → Expression<bool> -
An expression checking whether
thisis not included in any row of the providedselectstatement.inherited -
isNotNull(
) → Expression< bool> -
Expression that is true if the inner expression resolves to a non-null
value.
inherited
-
isNotValue(
T value) → Expression< bool> -
Generates an
IS NOTexpression in SQL, comparing this expression with the Dartvalue.inherited -
isNull(
) → Expression< bool> -
Expression that is true if the inner expression resolves to a null value.
inherited
-
isValue(
T value) → Expression< bool> -
Generates an
ISexpression in SQL, comparing this expression with the Dartvalue.inherited -
like(
String regex, {String? escapeChar}) → Expression< bool> -
Available on Expression<
Whether this column matches the given pattern. For details on what patters are valid and how they are interpreted, check out this tutorial.String> , provided by the StringExpressionOperators extension -
likeExp(
Expression< String> regex, {Expression<String> ? escape}) → Expression<bool> -
Available on Expression<
Whether this column matches the given expression. For details on what patters are valid and how they are interpreted, check out this tutorial.String> , provided by the StringExpressionOperators extension -
lower(
) → Expression< String> -
Available on Expression<
Calls the sqlite functionString> , provided by the StringExpressionOperators extensionLOWERonthisstring. Please note that, in most sqlite installations, this only affects ascii chars. -
map<
Dart> (TypeConverter< Dart, T?> converter) → ColumnBuilder<T> -
Uses a custom
converterto store custom Dart objects in a single column and automatically mapping them from and to sql. -
max(
{Expression< bool> ? filter}) → Expression<DT> -
Available on Expression<
Return the maximum of all non-null values in this group.DT> , provided by the ArithmeticAggregates extension -
max(
{Expression< bool> ? filter}) → Expression<DT> -
Available on Expression<
Return the maximum of all non-null values in this group.DT> , provided by the BaseAggregate extension -
max(
{Expression< bool> ? filter}) → Expression<BigInt> -
Available on Expression<
Return the maximum of all non-null values in this group.BigInt> , provided by the BigIntAggregates extension -
max(
{Expression< bool> ? filter}) → Expression<DateTime> -
Available on Expression<
Return the maximum of all non-null values in this group.DateTime> , provided by the DateTimeAggregate extension -
min(
{Expression< bool> ? filter}) → Expression<BigInt> -
Available on Expression<
Return the minimum of all non-null values in this group.BigInt> , provided by the BigIntAggregates extension -
min(
{Expression< bool> ? filter}) → Expression<DT> -
Available on Expression<
Return the minimum of all non-null values in this group.DT> , provided by the BaseAggregate extension -
min(
{Expression< bool> ? filter}) → Expression<DT> -
Available on Expression<
Return the minimum of all non-null values in this group.DT> , provided by the ArithmeticAggregates extension -
min(
{Expression< bool> ? filter}) → Expression<DateTime> -
Available on Expression<
Return the minimum of all non-null values in this group.DateTime> , provided by the DateTimeAggregate extension -
named(
String name) → ColumnBuilder< T> -
By default, the field name will be used as the column name, e.g.
IntColumn get id = integer()will have "id" as its associated name. Columns made up of multiple words are expected to be in camelCase and will be converted to snake_case (e.g. a getter called accountCreationDate will result in an SQL column called account_creation_date). To change this default behavior, use something likeIntColumn get id = integer((c) => c.named('user_id')). -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
not(
) → Expression< bool> -
Available on Expression<
Negates this boolean expression. The returned expression is true ifbool> , provided by the BooleanExpressionOperators extensionthisis false, and vice versa. -
nullable(
) → ColumnBuilder< T> - Marks this column as nullable. Nullable columns should not appear in a primary key. Columns are non-null by default.
-
nullIf(
Expression< T> matcher) → Expression<T> -
Returns
nullifmatcheris equal to this expression,thisotherwise.inherited -
roundToInt(
) → Expression< int> -
Available on Expression<
Rounds this expression to the nearest integer.BigInt> , provided by the ArithmeticBigIntExpr extension -
roundToInt(
) → Expression< int> -
Available on Expression<
Rounds this expression to the nearest integer.DT> , provided by the ArithmeticExpr extension -
substr(
int start, [int? length]) → Expression< String> -
Available on Expression<
Calls theString> , provided by the StringExpressionOperators extensionsubstrfunction on this string. -
substrExpr(
Expression< int> start, [Expression<int> ? length]) → Expression<String> -
Available on Expression<
Calls theString> , provided by the StringExpressionOperators extensionsubstrfunction with arbitrary expressions as arguments. -
sum(
{Expression< bool> ? filter}) → Expression<BigInt> -
Available on Expression<
Calculate the sum of all non-null values in the group.BigInt> , provided by the BigIntAggregates extension -
sum(
{Expression< bool> ? filter}) → Expression<DT> -
Available on Expression<
Calculate the sum of all non-null values in the group.DT> , provided by the ArithmeticAggregates extension -
toString(
) → String -
A string representation of this object.
inherited
-
total(
{Expression< bool> ? filter}) → Expression<double> -
Available on Expression<
Calculate the sum of all non-null values in the group.BigInt> , provided by the BigIntAggregates extension -
total(
{Expression< bool> ? filter}) → Expression<double> -
Available on Expression<
Calculate the sum of all non-null values in the group.DT> , provided by the ArithmeticAggregates extension -
trim(
) → Expression< String> -
Available on Expression<
Removes spaces from both ends of this string.String> , provided by the StringExpressionOperators extension -
trimLeft(
) → Expression< String> -
Available on Expression<
Removes spaces from the beginning of this string.String> , provided by the StringExpressionOperators extension -
trimRight(
) → Expression< String> -
Available on Expression<
Removes spaces from the end of this string.String> , provided by the StringExpressionOperators extension -
unique(
) → ColumnBuilder< T> - Adds UNIQUE constraint to column.
-
upper(
) → Expression< String> -
Available on Expression<
Calls the sqlite functionString> , provided by the StringExpressionOperators extensionUPPERonthisstring. Please note that, in most sqlite installations, this only affects ascii chars. -
variable(
T? value) → Variable< T> -
Creates a variable that is guaranteed to have the same SqlType as
this.inherited
Operators
-
operator &(
Expression< bool> other) → Expression<bool> -
Available on Expression<
Returns an expression that is true iff bothbool> , provided by the BooleanExpressionOperators extensionthisandotherare true. -
operator *(
Expression< BigInt> other) → Expression<BigInt> -
Available on Expression<
Performs a multiplication (BigInt> , provided by the ArithmeticBigIntExpr extensionthis*other) in sql. -
operator *(
Expression< DT> other) → Expression<DT> -
Available on Expression<
Performs a multiplication (DT> , provided by the ArithmeticExpr extensionthis*other) in sql. -
operator +(
Expression< BigInt> other) → Expression<BigInt> -
Available on Expression<
Performs an addition (BigInt> , provided by the ArithmeticBigIntExpr extensionthis+other) in sql. -
operator +(
Expression< DT> other) → Expression<DT> -
Available on Expression<
Performs an addition (DT> , provided by the ArithmeticExpr extensionthis+other) in sql. -
operator +(
Expression< String> other) → Expression<String> -
Available on Expression<
Performs a string concatenation in sql by appendingString> , provided by the StringExpressionOperators extensionothertothis. -
operator -(
Expression< BigInt> other) → Expression<BigInt> -
Available on Expression<
Performs a subtraction (BigInt> , provided by the ArithmeticBigIntExpr extensionthis-other) in sql. -
operator -(
Expression< DT> other) → Expression<DT> -
Available on Expression<
Performs a subtraction (DT> , provided by the ArithmeticExpr extensionthis-other) in sql. -
operator /(
Expression< BigInt> other) → Expression<BigInt> -
Available on Expression<
Performs a division (BigInt> , provided by the ArithmeticBigIntExpr extensionthis/other) in sql. -
operator /(
Expression< DT> other) → Expression<DT> -
Available on Expression<
Performs a division (DT> , provided by the ArithmeticExpr extensionthis/other) in sql. -
operator ==(
Object other) → bool -
The equality operator.
inherited
-
operator unary-(
) → Expression< BigInt> -
Available on Expression<
Returns the negation of this value.BigInt> , provided by the ArithmeticBigIntExpr extension -
operator unary-(
) → Expression< DT> -
Available on Expression<
Returns the negation of this value.DT> , provided by the ArithmeticExpr extension -
operator |(
Expression< bool> other) → Expression<bool> -
Available on Expression<
Returns an expression that is true ifbool> , provided by the BooleanExpressionOperators extensionthisorotherare true. -
operator ~(
) → Expression< BigInt> -
Available on Expression<
Flips all bits in this value (turningBigInt> , provided by the BitwiseBigInt extension0to1and vice-versa) and returns the result. -
operator ~(
) → Expression< int> -
Available on Expression<
Flips all bits in this value (turningint> , provided by the BitwiseInt extension0to1and vice-versa) and returns the result.