run() — drizzle-orm Function Reference
Architecture documentation for the run() function in db.ts from the drizzle-orm codebase.
Entity Profile
Dependency Diagram
graph TD 7aa1e133_803c_8614_dde4_b88e3702b5a8["run()"] 9f85cd22_fd1d_a3c9_2e3f_f17ef323455e["BaseSQLiteDatabase"] 7aa1e133_803c_8614_dde4_b88e3702b5a8 -->|defined in| 9f85cd22_fd1d_a3c9_2e3f_f17ef323455e 22556be1_3c4d_bb6a_b1d6_687082441712["withReplicas()"] 22556be1_3c4d_bb6a_b1d6_687082441712 -->|calls| 7aa1e133_803c_8614_dde4_b88e3702b5a8 99e67617_129f_d3c8_e928_0b7a61b52ed9["getSQL()"] 7aa1e133_803c_8614_dde4_b88e3702b5a8 -->|calls| 99e67617_129f_d3c8_e928_0b7a61b52ed9 style 7aa1e133_803c_8614_dde4_b88e3702b5a8 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
drizzle-orm/src/sqlite-core/db.ts lines 533–545
run(query: SQLWrapper | string): DBResult<TResultKind, TRunResult> {
const sequel = typeof query === 'string' ? sql.raw(query) : query.getSQL();
if (this.resultKind === 'async') {
return new SQLiteRaw(
async () => this.session.run(sequel),
() => sequel,
'run',
this.dialect as SQLiteAsyncDialect,
this.session.extractRawRunValueFromBatchResult.bind(this.session),
) as DBResult<TResultKind, TRunResult>;
}
return this.session.run(sequel) as DBResult<TResultKind, TRunResult>;
}
Domain
Subdomains
Defined In
Calls
Called By
Source
Frequently Asked Questions
What does run() do?
run() is a function in the drizzle-orm codebase, defined in drizzle-orm/src/sqlite-core/db.ts.
Where is run() defined?
run() is defined in drizzle-orm/src/sqlite-core/db.ts at line 533.
What does run() call?
run() calls 1 function(s): getSQL.
What calls run()?
run() is called by 1 function(s): withReplicas.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free