UNPKG

pg-mermaid

Version:

Mermaid diagram generator for PostgreSQL database schema

123 lines (122 loc) 4.01 kB
import { type DatabasePool } from 'slonik'; type createConnectionParameters = { dbname: string; host?: string; password: string; port?: number; username: string; }; export declare const createConnection: ({ dbname, host, password, port, username, }: createConnectionParameters) => Promise<DatabasePool>; type GetEntitiesParameters = { excludedTables?: string[]; schema?: string; }; export declare const getEntities: ({ excludedTables, schema, }?: GetEntitiesParameters) => Readonly<{ parser: import("zod").ZodObject<{ attributes: import("zod").ZodArray<import("zod").ZodObject<{ comment: import("zod").ZodUnion<[import("zod").ZodLiteral<"not null">, import("zod").ZodLiteral<"null">]>; key: import("zod").ZodNullable<import("zod").ZodUnion<[import("zod").ZodLiteral<"PK">, import("zod").ZodLiteral<"FK">]>>; name: import("zod").ZodString; type: import("zod").ZodString; }, "strip", import("zod").ZodTypeAny, { type: string; comment: "null" | "not null"; key: "PK" | "FK" | null; name: string; }, { type: string; comment: "null" | "not null"; key: "PK" | "FK" | null; name: string; }>, "many">; name: import("zod").ZodString; }, "strip", import("zod").ZodTypeAny, { attributes: { type: string; comment: "null" | "not null"; key: "PK" | "FK" | null; name: string; }[]; name: string; }, { attributes: { type: string; comment: "null" | "not null"; key: "PK" | "FK" | null; name: string; }[]; name: string; }>; type: "SLONIK_TOKEN_QUERY"; sql: string; values: import("slonik").PrimitiveValueExpression[]; }>; type GetRelationshipsParameters = { excludedTables?: string[]; schema?: string; }; export declare const getRelationships: ({ excludedTables, schema, }?: GetRelationshipsParameters) => Readonly<{ parser: import("zod").ZodObject<{ child: import("zod").ZodObject<{ attributes: import("zod").ZodArray<import("zod").ZodString, "many">; entity: import("zod").ZodString; }, "strip", import("zod").ZodTypeAny, { attributes: string[]; entity: string; }, { attributes: string[]; entity: string; }>; parent: import("zod").ZodObject<{ attributes: import("zod").ZodArray<import("zod").ZodString, "many">; entity: import("zod").ZodString; }, "strip", import("zod").ZodTypeAny, { attributes: string[]; entity: string; }, { attributes: string[]; entity: string; }>; }, "strip", import("zod").ZodTypeAny, { child: { attributes: string[]; entity: string; }; parent: { attributes: string[]; entity: string; }; }, { child: { attributes: string[]; entity: string; }; parent: { attributes: string[]; entity: string; }; }>; type: "SLONIK_TOKEN_QUERY"; sql: string; values: import("slonik").PrimitiveValueExpression[]; }>; type GetIndexesParameters = { excludedTables?: string[]; schema?: string; }; export declare const getIndexes: ({ excludedTables, schema, }?: GetIndexesParameters) => Readonly<{ parser: import("zod").ZodObject<{ indexes: import("zod").ZodArray<import("zod").ZodString, "many">; name: import("zod").ZodString; }, "strip", import("zod").ZodTypeAny, { name: string; indexes: string[]; }, { name: string; indexes: string[]; }>; type: "SLONIK_TOKEN_QUERY"; sql: string; values: import("slonik").PrimitiveValueExpression[]; }>; export {};