asDateTime method

Expr<DateTime?> asDateTime()

Cast as Expr<DateTime?> using CAST(NULL AS TIMESTAMP).

This method is rarely necessary, as you can generally pass toExpr(null) to any method expecting an Expr<DateTime?>. But in some complex scenarios this can alleviate type inference issues.

Implementation

Expr<DateTime?> asDateTime() => CastExpression._(this, ColumnType.dateTime);