@zeno-lib/schema 0.3.0 → 0.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,11 @@
1
+ import type { Table } from "drizzle-orm"
2
+
3
+ // What `table()` from `@zeno-lib/db/schema` records on a drizzle table that
4
+ // has no column rules. This package can't import db, whose own tests build
5
+ // real Zeno tables and cover the rules.
6
+ export const zenoTable = <TTable extends Table>(table: TTable) =>
7
+ Object.defineProperty(table, "~zeno", {
8
+ value: { columns: {} },
9
+ }) as TTable & {
10
+ readonly "~zeno": { readonly columns: Record<never, never> }
11
+ }