json function

ColumnDefinition<SqlJson> json({
  1. String? name,
  2. bool unique = false,
  3. String? defaultSql,
  4. SqlJson clientDefault()?,
})

A JSON document; its content can itself be JSON null.

name fixes the physical column name; otherwise snake_case is derived from the Record field. defaultSql is trusted database SQL. clientDefault runs only for omitted insert values and may coexist with a database default.

Implementation

ColumnDefinition<SqlJson> json({
  String? name,
  bool unique = false,
  String? defaultSql,
  SqlJson Function()? clientDefault,
}) => const ColumnDefinition._();