CurrentDateOrTimeExpression class final
An expression that evaluates to the current date or the current date and time.
- Inheritance
-
- Object
- Expression<
DateTime> - CurrentDateOrTimeExpression
- 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 - includeTime → bool
-
Whether this should evaluate to the current date and time, or just to the
current date.
final
-
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 -
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 - precedence → Precedence
-
The precedence of this expression. This can be used to automatically put
parentheses around expressions as needed.
no setteroverride
- 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<
DateTime> -
Resolves the SqlType implementation describing the type of this
expression.
no setterinherited
-
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
-
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. -
caseMatch<
R extends Object> ({required Map< Expression< when, Expression<DateTime> , 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 -
compileWith(
StatementCompiler compiler) → void -
Compiles this component with the given StatementCompiler by invoking the
relevant
addmethod on it.override -
dartCast<
T2 extends Object> ({SqlType< T2> ? customType}) → Expression<T2> -
Casts this expression to an expression of
D.inherited -
equals(
DateTime 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< DateTime> compare) → Expression<bool> -
Whether this expression is equal to the given expression.
inherited
-
equalsNullable(
DateTime? compare) → Expression< bool> -
Compares the value of this column to
compareornull.inherited -
iif(
Expression< bool> predicate, Expression<DateTime> ifFalse) → Expression<DateTime> -
Evaluates to
thisifpredicateis true, otherwise evaluates toifFalse.inherited -
isExp(
Expression< DateTime> other) → Expression<bool> -
Generates an
ISexpression in SQL, comparing this expression with theotherexpression.inherited -
isIn(
Iterable< DateTime> values) → Expression<bool> -
An expression that is true if
thisresolves to any of the values invalues.inherited -
isInExp(
List< Expression< expressions) → Expression<DateTime> >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 -
isNotExp(
Expression< DateTime> other) → Expression<bool> -
Generates an
IS NOTexpression in SQL, comparing this expression with theotherexpression.inherited -
isNotIn(
Iterable< DateTime> values) → Expression<bool> -
An expression that is true if
thisdoes not resolve to any of the values invalues.inherited -
isNotInExp(
List< Expression< expressions) → Expression<DateTime> >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(
DateTime 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(
DateTime value) → Expression< bool> -
Generates an
ISexpression in SQL, comparing this expression with the Dartvalue.inherited -
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<DateTime> -
Available on Expression<
Return the minimum of all non-null values in this group.DateTime> , provided by the DateTimeAggregate extension -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
nullIf(
Expression< DateTime> matcher) → Expression<DateTime> -
Returns
nullifmatcheris equal to this expression,thisotherwise.inherited -
toString(
) → String -
A string representation of this object.
inherited
-
variable(
DateTime? value) → Variable< DateTime> -
Creates a variable that is guaranteed to have the same SqlType as
this.inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited