( path: string | string[], casing: CasingType | undefined, schemaFilter?: string[], )
| 26 | }; |
| 27 | |
| 28 | export const serializePg = async ( |
| 29 | path: string | string[], |
| 30 | casing: CasingType | undefined, |
| 31 | schemaFilter?: string[], |
| 32 | ): Promise<PgSchemaInternal> => { |
| 33 | const filenames = prepareFilenames(path); |
| 34 | |
| 35 | const { prepareFromPgImports } = await import('./pgImports'); |
| 36 | const { generatePgSnapshot } = await import('./pgSerializer'); |
| 37 | |
| 38 | const { tables, enums, schemas, sequences, views, matViews, roles, policies } = await prepareFromPgImports( |
| 39 | filenames, |
| 40 | ); |
| 41 | |
| 42 | return generatePgSnapshot(tables, enums, schemas, sequences, roles, policies, views, matViews, casing, schemaFilter); |
| 43 | }; |
| 44 | |
| 45 | export const serializeSQLite = async ( |
| 46 | path: string | string[], |
no test coverage detected