Skip to main content

ColumnRole

@webda/sql-schema


Type Alias: ColumnRole

ColumnRole = "field" | "reference" | "type" | "extra" | "owner" | "target" | "position" | "key" | "attributes"

Defined in: packages/sql-schema/src/plan.ts:28

What a column holds

  • field: a model field (scalar or JSON)
  • reference: the key (or one key part) of a linked model (ModelLink, ModelParent)
  • type: the __type class discriminator
  • extra: the JSON column keeping the properties the schema does not know
  • owner / target: the keys of a junction row
  • position: the index of the link in its array
  • key: the key of the link in its map
  • attributes: the JSON column holding the link attributes when they have no declared field