toExprLiteral<T extends Object?> function Inserting rows Writing queries Update and delete

Expr<T> toExprLiteral<T extends Object?>(
  1. T value
)

Create an Expr<T> wrapping value as SQL literal.

The type of value must be one of:

Note

If you want to use a CustomDataType, use the .asExprLiteral extension method instead.

When wrapping a DateTime object using toExprLiteral, it will be normalized to UTC before encoding to the database.

Implementation

Expr<T> toExprLiteral<T extends Object?>(T value) => LiteralExpression(value);