prepareAddCompositePrimaryKeyPg() — drizzle-orm Function Reference
Architecture documentation for the prepareAddCompositePrimaryKeyPg() function in jsonStatements.ts from the drizzle-orm codebase.
Entity Profile
Dependency Diagram
graph TD 26ffa14f_900f_1b7c_5ade_1416354dba1c["prepareAddCompositePrimaryKeyPg()"] 6139f734_8ada_c641_9fec_9a55cfdf376f["jsonStatements.ts"] 26ffa14f_900f_1b7c_5ade_1416354dba1c -->|defined in| 6139f734_8ada_c641_9fec_9a55cfdf376f c7a398db_43c9_7771_09b7_73bc09e703e8["applyPgSnapshotsDiff()"] c7a398db_43c9_7771_09b7_73bc09e703e8 -->|calls| 26ffa14f_900f_1b7c_5ade_1416354dba1c style 26ffa14f_900f_1b7c_5ade_1416354dba1c fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
drizzle-kit/src/jsonStatements.ts lines 3154–3171
export const prepareAddCompositePrimaryKeyPg = (
tableName: string,
schema: string,
pks: Record<string, string>,
// TODO: remove?
json2: PgSchema,
): JsonCreateCompositePK[] => {
return Object.values(pks).map((it) => {
const unsquashed = PgSquasher.unsquashPK(it);
return {
type: 'create_composite_pk',
tableName,
data: it,
schema,
constraintName: PgSquasher.unsquashPK(it).name,
} as JsonCreateCompositePK;
});
};
Domain
Subdomains
Defined In
Called By
Source
Frequently Asked Questions
What does prepareAddCompositePrimaryKeyPg() do?
prepareAddCompositePrimaryKeyPg() is a function in the drizzle-orm codebase, defined in drizzle-kit/src/jsonStatements.ts.
Where is prepareAddCompositePrimaryKeyPg() defined?
prepareAddCompositePrimaryKeyPg() is defined in drizzle-kit/src/jsonStatements.ts at line 3154.
What calls prepareAddCompositePrimaryKeyPg()?
prepareAddCompositePrimaryKeyPg() is called by 1 function(s): applyPgSnapshotsDiff.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free