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

prepareDeleteCheckConstraint() — drizzle-orm Function Reference

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

Entity Profile

Dependency Diagram

graph TD
  962bc824_18d0_af30_683e_9e641cca0baa["prepareDeleteCheckConstraint()"]
  6139f734_8ada_c641_9fec_9a55cfdf376f["jsonStatements.ts"]
  962bc824_18d0_af30_683e_9e641cca0baa -->|defined in| 6139f734_8ada_c641_9fec_9a55cfdf376f
  c7a398db_43c9_7771_09b7_73bc09e703e8["applyPgSnapshotsDiff()"]
  c7a398db_43c9_7771_09b7_73bc09e703e8 -->|calls| 962bc824_18d0_af30_683e_9e641cca0baa
  a5972ffc_ff1b_9523_2495_5373af710e65["applyMysqlSnapshotsDiff()"]
  a5972ffc_ff1b_9523_2495_5373af710e65 -->|calls| 962bc824_18d0_af30_683e_9e641cca0baa
  d4992b27_bf78_8099_5134_750cef1c518c["applySingleStoreSnapshotsDiff()"]
  d4992b27_bf78_8099_5134_750cef1c518c -->|calls| 962bc824_18d0_af30_683e_9e641cca0baa
  d9097b7e_1e27_d29f_7732_f2fa1447f2b8["applySqliteSnapshotsDiff()"]
  d9097b7e_1e27_d29f_7732_f2fa1447f2b8 -->|calls| 962bc824_18d0_af30_683e_9e641cca0baa
  55569cde_7638_9cfc_9dcd_34636d975ec3["applyLibSQLSnapshotsDiff()"]
  55569cde_7638_9cfc_9dcd_34636d975ec3 -->|calls| 962bc824_18d0_af30_683e_9e641cca0baa
  style 962bc824_18d0_af30_683e_9e641cca0baa fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

drizzle-kit/src/jsonStatements.ts lines 3257–3270

export const prepareDeleteCheckConstraint = (
	tableName: string,
	schema: string,
	check: Record<string, string>,
): JsonDeleteCheckConstraint[] => {
	return Object.values(check).map((it) => {
		return {
			type: 'delete_check_constraint',
			tableName,
			constraintName: PgSquasher.unsquashCheck(it).name,
			schema,
		} as JsonDeleteCheckConstraint;
	});
};

Domain

Subdomains

Frequently Asked Questions

What does prepareDeleteCheckConstraint() do?
prepareDeleteCheckConstraint() is a function in the drizzle-orm codebase, defined in drizzle-kit/src/jsonStatements.ts.
Where is prepareDeleteCheckConstraint() defined?
prepareDeleteCheckConstraint() is defined in drizzle-kit/src/jsonStatements.ts at line 3257.
What calls prepareDeleteCheckConstraint()?
prepareDeleteCheckConstraint() is called by 5 function(s): applyLibSQLSnapshotsDiff, applyMysqlSnapshotsDiff, applyPgSnapshotsDiff, applySingleStoreSnapshotsDiff, applySqliteSnapshotsDiff.

Analyze Your Own Codebase

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

Try Supermodel Free