applyLibSQLDiffs() — drizzle-orm Function Reference
Architecture documentation for the applyLibSQLDiffs() function in schemaDiffer.ts from the drizzle-orm codebase.
Entity Profile
Dependency Diagram
graph TD bf733442_f700_0747_b445_7417f19f76ae["applyLibSQLDiffs()"] fb6b4a65_030b_ce6b_df0d_2be21adcd2b3["schemaDiffer.ts"] bf733442_f700_0747_b445_7417f19f76ae -->|defined in| fb6b4a65_030b_ce6b_df0d_2be21adcd2b3 68ca323e_4506_d486_b587_96a21ba359f3["diffTestSchemasPushLibSQL()"] 68ca323e_4506_d486_b587_96a21ba359f3 -->|calls| bf733442_f700_0747_b445_7417f19f76ae b6612fd2_9181_aeb0_1129_3ff1a369e4e3["introspectLibSQLToFile()"] b6612fd2_9181_aeb0_1129_3ff1a369e4e3 -->|calls| bf733442_f700_0747_b445_7417f19f76ae fd1b2256_62ed_ec7e_c677_9d8cbf56136b["testTablesResolver()"] bf733442_f700_0747_b445_7417f19f76ae -->|calls| fd1b2256_62ed_ec7e_c677_9d8cbf56136b 96edd91d_9f30_fc37_cbd3_7c1229315b14["testColumnsResolver()"] bf733442_f700_0747_b445_7417f19f76ae -->|calls| 96edd91d_9f30_fc37_cbd3_7c1229315b14 ca971472_1126_152f_0fc8_502996a52ea8["testViewsResolverSqlite()"] bf733442_f700_0747_b445_7417f19f76ae -->|calls| ca971472_1126_152f_0fc8_502996a52ea8 style bf733442_f700_0747_b445_7417f19f76ae fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
drizzle-kit/tests/schemaDiffer.ts lines 2114–2165
export const applyLibSQLDiffs = async (
sn: SqliteSchema,
action?: 'push' | undefined,
casing?: CasingType | undefined,
) => {
const dryRun = {
version: '6',
dialect: 'sqlite',
id: '0',
prevId: '0',
tables: {},
views: {},
enums: {},
schemas: {},
_meta: {
schemas: {},
tables: {},
columns: {},
},
} as const;
const tables = Object.values(sn).filter((it) => is(it, SQLiteTable)) as SQLiteTable[];
const views = Object.values(sn).filter((it) => is(it, SQLiteView)) as SQLiteView[];
const serialized1 = generateSqliteSnapshot(tables, views, casing);
const { version: v1, dialect: d1, ...rest1 } = serialized1;
const sch1 = {
version: '6',
dialect: 'sqlite',
id: '0',
prevId: '0',
...rest1,
} as const;
const sn1 = squashSqliteScheme(sch1, action);
const { sqlStatements, statements } = await applyLibSQLSnapshotsDiff(
dryRun,
sn1,
testTablesResolver(new Set()),
testColumnsResolver(new Set()),
testViewsResolverSqlite(new Set()),
dryRun,
sch1,
action,
);
return { sqlStatements, statements };
};
Domain
Subdomains
Defined In
Source
Frequently Asked Questions
What does applyLibSQLDiffs() do?
applyLibSQLDiffs() is a function in the drizzle-orm codebase, defined in drizzle-kit/tests/schemaDiffer.ts.
Where is applyLibSQLDiffs() defined?
applyLibSQLDiffs() is defined in drizzle-kit/tests/schemaDiffer.ts at line 2114.
What does applyLibSQLDiffs() call?
applyLibSQLDiffs() calls 3 function(s): testColumnsResolver, testTablesResolver, testViewsResolverSqlite.
What calls applyLibSQLDiffs()?
applyLibSQLDiffs() is called by 2 function(s): diffTestSchemasPushLibSQL, introspectLibSQLToFile.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free