Relation._tag
property · packages/metakit/src/relation.ts:77
readonly _tag: 'Relation'Metakit / @doeixd/metakit/relation
interface · packages/metakit/src/relation.ts:76
interface Relation<Row> extends Pipeable.Pipeable {
readonly _tag: 'Relation'
readonly name: string
readonly row: Schema.Codec<Row>
readonly cardinality?: Cardinality
readonly foreignKey?: string | ReadonlyArray<string>
readonly parentKey?: string | ReadonlyArray<string>
readonly onDelete?: OnDelete
}The rows of one kind pointing at a row of another through one of their fields.
Relation._tagproperty · packages/metakit/src/relation.ts:77
readonly _tag: 'Relation'Relation.nameproperty · packages/metakit/src/relation.ts:79
readonly name: stringThe kind and the field it points by, as Follow.followee.
Relation.rowproperty · packages/metakit/src/relation.ts:81
readonly row: Schema.Codec<Row>The Schema of a pointing row.
Relation.cardinalityproperty · packages/metakit/src/relation.ts:83
readonly cardinality?: CardinalityCardinality from parent row to pointing rows ('one', 'optional', or 'many').
Relation.foreignKeyproperty · packages/metakit/src/relation.ts:85
readonly foreignKey?: string | ReadonlyArray<string>Foreign-key field(s) on the child row pointing to the parent.
Relation.parentKeyproperty · packages/metakit/src/relation.ts:87
readonly parentKey?: string | ReadonlyArray<string>Primary/key field(s) on the parent row (default 'id').
Relation.onDeleteproperty · packages/metakit/src/relation.ts:89
readonly onDelete?: OnDeleteReferential action when the parent row is deleted.