Metakit / @doeixd/metakit/drizzle
toCheck
function · packages/metakit/src/drizzle.ts:290
function toCheck<S extends Schema.Top>(
schema: S,
table: Table,
options?: {
readonly dialect?: SqlDialect
},
): Result.Result<SQL, SqlUnsupportedError>Every 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; literals are written into the text.