MCPcopy
hub / github.com/drizzle-team/drizzle-orm / serializePg

Function serializePg

drizzle-kit/src/serializer/index.ts:28–43  ·  view source on GitHub ↗
(
	path: string | string[],
	casing: CasingType | undefined,
	schemaFilter?: string[],
)

Source from the content-addressed store, hash-verified

26};
27
28export 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
45export const serializeSQLite = async (
46 path: string | string[],

Callers 3

preparePgDbPushSnapshotFunction · 0.90
pgPushFunction · 0.90

Calls 3

prepareFilenamesFunction · 0.85
prepareFromPgImportsFunction · 0.85
generatePgSnapshotFunction · 0.85

Tested by

no test coverage detected