Metakit / @doeixd/metakit/drizzle

DrizzleRelation

interface · packages/metakit/src/drizzle.ts:60

interface DrizzleRelation {
  readonly table: Table
  readonly foreignKey: AnyColumn | ReadonlyArray<AnyColumn>
  readonly key?: AnyColumn | ReadonlyArray<AnyColumn>
}

Where the rows related to a row through a relation are: their table, the column of it that holds the id of the row they point at, and the column of the row's own table that id is (default its id). A column that is not of its table is refused when the relation is lowered.

Members

DrizzleRelation.table

property · packages/metakit/src/drizzle.ts:61

readonly table: Table

DrizzleRelation.foreignKey

property · packages/metakit/src/drizzle.ts:62

readonly foreignKey: AnyColumn | ReadonlyArray<AnyColumn>

DrizzleRelation.key

property · packages/metakit/src/drizzle.ts:63

readonly key?: AnyColumn | ReadonlyArray<AnyColumn>