Home / Function/ prepareDeleteCompositePrimaryKeyMySql() — drizzle-orm Function Reference

prepareDeleteCompositePrimaryKeyMySql() — drizzle-orm Function Reference

Architecture documentation for the prepareDeleteCompositePrimaryKeyMySql() function in jsonStatements.ts from the drizzle-orm codebase.

Entity Profile

Dependency Diagram

graph TD
  d94b5c61_571d_785a_8ed1_9b18bc8ea211["prepareDeleteCompositePrimaryKeyMySql()"]
  6139f734_8ada_c641_9fec_9a55cfdf376f["jsonStatements.ts"]
  d94b5c61_571d_785a_8ed1_9b18bc8ea211 -->|defined in| 6139f734_8ada_c641_9fec_9a55cfdf376f
  a5972ffc_ff1b_9523_2495_5373af710e65["applyMysqlSnapshotsDiff()"]
  a5972ffc_ff1b_9523_2495_5373af710e65 -->|calls| d94b5c61_571d_785a_8ed1_9b18bc8ea211
  style d94b5c61_571d_785a_8ed1_9b18bc8ea211 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

drizzle-kit/src/jsonStatements.ts lines 3326–3340

export const prepareDeleteCompositePrimaryKeyMySql = (
	tableName: string,
	pks: Record<string, string>,
	// TODO: remove?
	json1: MySqlSchema,
): JsonDeleteCompositePK[] => {
	return Object.values(pks).map((it) => {
		const unsquashed = MySqlSquasher.unsquashPK(it);
		return {
			type: 'delete_composite_pk',
			tableName,
			data: it,
		} as JsonDeleteCompositePK;
	});
};

Domain

Subdomains

Frequently Asked Questions

What does prepareDeleteCompositePrimaryKeyMySql() do?
prepareDeleteCompositePrimaryKeyMySql() is a function in the drizzle-orm codebase, defined in drizzle-kit/src/jsonStatements.ts.
Where is prepareDeleteCompositePrimaryKeyMySql() defined?
prepareDeleteCompositePrimaryKeyMySql() is defined in drizzle-kit/src/jsonStatements.ts at line 3326.
What calls prepareDeleteCompositePrimaryKeyMySql()?
prepareDeleteCompositePrimaryKeyMySql() is called by 1 function(s): applyMysqlSnapshotsDiff.

Analyze Your Own Codebase

Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.

Try Supermodel Free