deno.land / x / pasta@0.0.6 / src / database / schema.ts
12345678910111213141516171819202122232425262728293031323334353637383940414243// 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 };
Version Info