Metakit / @doeixd/metakit/relation
make
function · packages/metakit/src/relation.ts:118
function make<S extends Schema.Top>(
name: string,
row: S,
options?: RelationOptions<S['Type']>,
): Relation<S['Type']>Declare a relation: Relation.make('Follow.followee', Follow, { cardinality: 'many' }).
Its foreignKey selects field(s) of the pointing row; a relation that names
the parent's key as well is declared with define, which checks the two.