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

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

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

The type of value must be one of:

Note

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

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

Implementation

Expr<T> toExpr<T extends Object?>(T value) => ValueExpression(value);