import { S as Snapshot, D as DrizzleObjects } from '../index.web-BVqZGBOS.cjs'; export { d as drizzleObjectsToSnapshot, s as schemaToDrizzleObjects, a as schemaToSnapshot } from '../index.web-BVqZGBOS.cjs'; import { D as DrizzleSchema, C as Casing } from '../global-v_LCR4XD.cjs'; import { P as PartialConfig } from '../loader.node-Bo9Dqnt1.cjs'; import 'drizzle-orm'; import 'drizzle-orm/pg-core'; import '../symbols-CdI5QtS4.cjs'; import 'drizzle-orm/relations'; import 'zod'; type DB = { query: (sql: string, params?: any[]) => Promise; }; /** * Import the Drizzle schema from a PostgreSQL database. * @param db - The database to import from. * @param schemaFilters - The schemas to import. * @param entities - The entities to import. */ declare function importFromDatabase(db: DB, schemaFilters: string[], entities?: { roles: boolean | { provider?: string | undefined; include?: string[] | undefined; exclude?: string[] | undefined; }; }): Promise; /** * Convert the schema SQL dump to a Drizzle snapshot * * **It requires `@electric-sql/pglite` and `@electric-sql/pglite/vector` to be installed** * * @param sqlDump - SQL dump * @returns Drizzle snapshot */ declare function sqlToSnapshot(sqlDump: string): Promise<{ dialect: "postgresql"; tables: Record; policies: Record; relations: { type: "many" | "one"; fieldName: string; relationName: string; referencedTableName: string; }[]; indexes: Record | undefined; where?: string | undefined; }>; foreignKeys: Record; compositePrimaryKeys: Record; uniqueConstraints: Record; checkConstraints: Record; isRLSEnabled: boolean; description?: string | undefined; }>; enums: Record; schemas: Record; sequences: Record; views: Record; materialized: boolean; isExisting: boolean; description?: string | undefined; with?: { checkOption?: "local" | "cascaded" | undefined; securityBarrier?: boolean | undefined; securityInvoker?: boolean | undefined; fillfactor?: number | undefined; toastTupleTarget?: number | undefined; parallelWorkers?: number | undefined; autovacuumEnabled?: boolean | undefined; vacuumIndexCleanup?: "on" | "auto" | "off" | undefined; vacuumTruncate?: boolean | undefined; autovacuumVacuumThreshold?: number | undefined; autovacuumVacuumScaleFactor?: number | undefined; autovacuumVacuumCostDelay?: number | undefined; autovacuumVacuumCostLimit?: number | undefined; autovacuumFreezeMinAge?: number | undefined; autovacuumFreezeMaxAge?: number | undefined; autovacuumFreezeTableAge?: number | undefined; autovacuumMultixactFreezeMinAge?: number | undefined; autovacuumMultixactFreezeMaxAge?: number | undefined; autovacuumMultixactFreezeTableAge?: number | undefined; logAutovacuumMinDuration?: number | undefined; userCatalogTable?: boolean | undefined; } | undefined; using?: string | undefined; definition?: string | undefined; withNoData?: boolean | undefined; tablespace?: string | undefined; }>; roles: Record; policies: Record; projectId: string; version: "7"; _meta: { columns: Record; tables: Record; schemas: Record; }; provider?: "supabase" | "neon" | undefined; internal?: { tables: Record; } | undefined>; } | undefined; }>; /** * Convert Drizzle objects to SQL * @param drizzleObjects - Drizzle objects * @param config - Drizzle config * @returns SQL */ declare function drizzleObjectsToSql(drizzleObjects: DrizzleObjects, config?: PartialConfig): string; /** * Convert snapshot to SQL statements * @param snapshot - Snapshot * @returns SQL statements */ declare function snapshotToSqlStatements(snapshot: Snapshot): string[]; /** * Convert snapshot to SQL * @param snapshot - Snapshot * @returns SQL */ declare function snapshotToSql(snapshot: Snapshot): string; /** * Convert schema to SQL statements * @param schema - Drizzle schema * @param config - Drizzle config * @returns SQL statements */ declare function schemaToSqlStatements(schema: DrizzleSchema, config?: PartialConfig): string[]; /** * Convert schema to SQL * @param schema - Drizzle schema * @param config - Drizzle config * @returns SQL */ declare function schemaToSql(schema: DrizzleSchema, config?: PartialConfig): string; /** * Convert snapshot to TypeScript * @param snapshot - Snapshot * @param casing - Casing * @returns TypeScript */ declare function snapshotToTypeScript(snapshot: Snapshot, casing: Casing): { file: string; imports: string; decalrations: string; schemaEntry: string; }; /** * Convert the SQL schema dump to a Drizzle TypeScript file * * **It requires `@electric-sql/pglite` and `@electric-sql/pglite/vector` to be installed** * * @param sqlDump - The SQL dump * @returns The TypeScript file */ declare function sqlToTypescript(sqlDump: string): Promise; export { DrizzleObjects, Snapshot, drizzleObjectsToSql, importFromDatabase, schemaToSql, schemaToSqlStatements, snapshotToSql, snapshotToSqlStatements, snapshotToTypeScript, sqlToSnapshot, sqlToTypescript };