SupaColumn<B extends SupaCore, T, J> constructor

const SupaColumn<B extends SupaCore, T, J>({
  1. required String name,
  2. J valueToJSON(
    1. T value
    )?,
  3. T valueFromJSON(
    1. J value
    )?,
})

An annotation to let the generator know that the field is a column of a Supabase table.

Provide T to specify the type of the column. (e.g. @SupaColumnHere<int>)

Implementation

const SupaColumn({
  required this.name,
  this.valueToJSON,
  this.valueFromJSON,
}) : super(queryPattern: name);