deno.land / x / pasta@0.0.6 / src / database / schema.ts

نووسراو ببینە
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
// Automatically generated by PASTAimport type { TableName, Tables } from "./custom-schema.ts";import { associations } from "./custom-schema.ts";
type KeysOf<T extends TableName> = Tables[T]["keys"];type ColumnsOf<T extends TableName> = Tables[T]["columns"];type ColumnNamesOf<T extends TableName> = (keyof ColumnsOf<T>)[];type AssociationsOf<T extends TableName> = Tables[T]["associations"];
type MxNAssociation = { kind: "MxN"; table: TableName; associativeTable: TableName; fks: Record<string, [string, string]>;};
type NAssociation = { kind: "1xN"; table: TableName; fks: Record<string, string>;};
type Association = | NAssociation | MxNAssociation;
type Associations = Record<TableName, Record<string, Association>>;
export type { Association, Associations, AssociationsOf, ColumnNamesOf, ColumnsOf, KeysOf, MxNAssociation, NAssociation, TableName, Tables,};export { associations };

pasta

Version Info

Tagged at
a year ago