UNPKG

@lucidcms/postgres-adapter

Version:

The official Postgres adapter for Lucid CMS

18 lines (17 loc) 735 B
import { DatabaseAdapter } from "@lucidcms/core"; import { ColumnDataType } from "kysely"; import postgres from "postgres"; import { jsonArrayFrom } from "kysely/helpers/postgres"; import { DatabaseConfig, InferredTable, KyselyDB } from "@lucidcms/core/types"; //#region src/index.d.ts declare class PostgresAdapter extends DatabaseAdapter { constructor(url: string, options?: Parameters<typeof postgres>[1]); initialise(): Promise<void>; get jsonArrayFrom(): typeof jsonArrayFrom; get config(): DatabaseConfig; inferSchema(tx?: KyselyDB): Promise<InferredTable[]>; formatDefaultValue(type: ColumnDataType, value: unknown): unknown; } //#endregion export { PostgresAdapter as default }; //# sourceMappingURL=index.d.ts.map