Metakit / API

@doeixd/metakit/drizzle

Drizzle SQL (@doeixd/metakit/drizzle, optional peer drizzle-orm): a Schema's rules for check(name, sql), a boolean expression for .where(...), and a transition as { set, where } for db.update(table).

The lowering is sqlLowering.ts, the one @doeixd/metakit/sql renders as text; this module renders its pieces with the table's own columns and Drizzle's parameters.

Functions

toCheckEvery rule of schema as a Drizzle SQL expression for check(name, sql). It fails where a rule is unknown of a null, as the Schema refuses that value;…
toUpdateA Transition and one input as { set, where } for db.update(table).set(set).where(where), set keyed by the table's column keys. where holds of a row only…
toWhereA boolean Expr as a Drizzle SQL predicate for .where(...), which keeps a row only where it is true.

Interfaces

DrizzleOptions
DrizzleRelationWhere 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…

Types

DrizzleRelationsThe table of each relation a Rows node over related rows names, as [relation, table] pairs. A relation listed twice throws.