asInt method
Cast as integer.
In SQL often translates to CAST(value AS BIGINT)
.
This is generally safe and won't cause runtime errors. Though decimals are truncated when casting a double to integer.
Example:
3.14
->3
Implementation
Expr<int> asInt() => CastExpression._(this, ColumnType.integer);