currentDateAndTime top-level constant
A sql expression that evaluates to the current date and time, similar to DateTime.now. Timestamps are stored with a second accuracy.
Implementation
const Expression<DateTime> currentDateAndTime = _DependingOnDateTimeExpression(
forIsoString: _currentTimestampLiteral,
forTimestamps: _CastInSqlExpression(
FunctionCallExpression('strftime', [
Constant('%s'),
_currentTimestampLiteral,
]),
DriftSqlType.dateTime,
),
);