copy() — drizzle-orm Function Reference
Architecture documentation for the copy() function in utils.ts from the drizzle-orm codebase.
Entity Profile
Dependency Diagram
graph TD 76b988d6_7533_c0ad_5fd9_3bef88fd1e57["copy()"] 5847e5ae_7b4a_4b02_b68f_883ef88b3c1a["utils.ts"] 76b988d6_7533_c0ad_5fd9_3bef88fd1e57 -->|defined in| 5847e5ae_7b4a_4b02_b68f_883ef88b3c1a c7a398db_43c9_7771_09b7_73bc09e703e8["applyPgSnapshotsDiff()"] c7a398db_43c9_7771_09b7_73bc09e703e8 -->|calls| 76b988d6_7533_c0ad_5fd9_3bef88fd1e57 a5972ffc_ff1b_9523_2495_5373af710e65["applyMysqlSnapshotsDiff()"] a5972ffc_ff1b_9523_2495_5373af710e65 -->|calls| 76b988d6_7533_c0ad_5fd9_3bef88fd1e57 d4992b27_bf78_8099_5134_750cef1c518c["applySingleStoreSnapshotsDiff()"] d4992b27_bf78_8099_5134_750cef1c518c -->|calls| 76b988d6_7533_c0ad_5fd9_3bef88fd1e57 d9097b7e_1e27_d29f_7732_f2fa1447f2b8["applySqliteSnapshotsDiff()"] d9097b7e_1e27_d29f_7732_f2fa1447f2b8 -->|calls| 76b988d6_7533_c0ad_5fd9_3bef88fd1e57 55569cde_7638_9cfc_9dcd_34636d975ec3["applyLibSQLSnapshotsDiff()"] 55569cde_7638_9cfc_9dcd_34636d975ec3 -->|calls| 76b988d6_7533_c0ad_5fd9_3bef88fd1e57 style 76b988d6_7533_c0ad_5fd9_3bef88fd1e57 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
drizzle-kit/src/utils.ts lines 36–38
export const copy = <T>(it: T): T => {
return JSON.parse(JSON.stringify(it));
};
Domain
Subdomains
Defined In
Called By
Source
Frequently Asked Questions
What does copy() do?
copy() is a function in the drizzle-orm codebase, defined in drizzle-kit/src/utils.ts.
Where is copy() defined?
copy() is defined in drizzle-kit/src/utils.ts at line 36.
What calls copy()?
copy() 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