update.ts — drizzle-orm Source File
Architecture documentation for update.ts, a typescript file in the drizzle-orm codebase. 10 imports, 0 dependents.
Entity Profile
Dependency Diagram
graph LR afc610b8_1520_83da_fa4c_c92e99605850["update.ts"] 9a56da77_7540_380c_f8b9_d8bde4914940["db.ts"] afc610b8_1520_83da_fa4c_c92e99605850 --> 9a56da77_7540_380c_f8b9_d8bde4914940 87dcb46e_0d95_8341_e760_d59ef620c68d["tables.ts"] afc610b8_1520_83da_fa4c_c92e99605850 --> 87dcb46e_0d95_8341_e760_d59ef620c68d 1f73ed82_3972_0f5c_0eb2_24d4fff59c90["cities"] afc610b8_1520_83da_fa4c_c92e99605850 --> 1f73ed82_3972_0f5c_0eb2_24d4fff59c90 05a4464c_b137_3d56_0f64_434dce6f7bad["users"] afc610b8_1520_83da_fa4c_c92e99605850 --> 05a4464c_b137_3d56_0f64_434dce6f7bad ccd8f141_31dd_df9e_0535_43efaea4d6db["better-sqlite3"] afc610b8_1520_83da_fa4c_c92e99605850 --> ccd8f141_31dd_df9e_0535_43efaea4d6db 25b05299_f48f_bceb_01ca_1343d330a8f7["utils.ts"] afc610b8_1520_83da_fa4c_c92e99605850 --> 25b05299_f48f_bceb_01ca_1343d330a8f7 5c46beaf_8b59_d2e3_def3_8af6daf1fccd["index.ts"] afc610b8_1520_83da_fa4c_c92e99605850 --> 5c46beaf_8b59_d2e3_def3_8af6daf1fccd be483a7f_d5d7_7a9b_9a13_44a4a6aafbbd["sql.ts"] afc610b8_1520_83da_fa4c_c92e99605850 --> be483a7f_d5d7_7a9b_9a13_44a4a6aafbbd 51a8c768_eb36_f23f_f0c0_532cdf69660f["update.ts"] afc610b8_1520_83da_fa4c_c92e99605850 --> 51a8c768_eb36_f23f_f0c0_532cdf69660f ecce3253_1e75_a87f_27b3_ca87e81a3024["utils.ts"] afc610b8_1520_83da_fa4c_c92e99605850 --> ecce3253_1e75_a87f_27b3_ca87e81a3024 style afc610b8_1520_83da_fa4c_c92e99605850 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
import type { RunResult } from 'better-sqlite3';
import type { Equal } from 'type-tests/utils.ts';
import { Expect } from 'type-tests/utils.ts';
import { eq } from '~/sql/expressions/index.ts';
import { sql } from '~/sql/sql.ts';
import type { SQLiteUpdate } from '~/sqlite-core/query-builders/update.ts';
import type { DrizzleTypeError } from '~/utils.ts';
import { bunDb, db } from './db.ts';
import { cities, users } from './tables.ts';
const updateRun = db.update(users)
.set({
name: 'John',
age1: 30,
})
.where(eq(users.id, 1))
.run();
Expect<Equal<RunResult, typeof updateRun>>;
const updateRunBun = bunDb.update(users)
.set({
name: 'John',
age1: 30,
})
.where(eq(users.id, 1))
.run();
Expect<Equal<void, typeof updateRunBun>>;
const updateAll = db.update(users)
.set({
name: 'John',
age1: 30,
})
.all();
Expect<Equal<DrizzleTypeError<'.all() cannot be used without .returning()'>, typeof updateAll>>;
const updateAllBun = bunDb.update(users)
.set({
name: 'John',
age1: 30,
})
.all();
Expect<Equal<DrizzleTypeError<'.all() cannot be used without .returning()'>, typeof updateAllBun>>;
const updateGet = db.update(users)
.set({
name: 'John',
age1: 30,
}).get();
Expect<Equal<DrizzleTypeError<'.get() cannot be used without .returning()'>, typeof updateGet>>;
const updateGetBun = bunDb.update(users)
.set({
name: 'John',
age1: 30,
}).get();
Expect<Equal<DrizzleTypeError<'.get() cannot be used without .returning()'>, typeof updateGetBun>>;
const updateAllReturningAll = db.update(users)
.set({
// ... (138 more lines)
Domain
Subdomains
Functions
Source
Frequently Asked Questions
What does update.ts do?
update.ts is a source file in the drizzle-orm codebase, written in typescript. It belongs to the DrizzleORM domain, SQLDialects subdomain.
What functions are defined in update.ts?
update.ts defines 2 function(s): dynamic, withReturning.
What does update.ts depend on?
update.ts imports 10 module(s): better-sqlite3, cities, db.ts, index.ts, sql.ts, tables.ts, update.ts, users, and 2 more.
Where is update.ts in the architecture?
update.ts is located at drizzle-orm/type-tests/sqlite/update.ts (domain: DrizzleORM, subdomain: SQLDialects, directory: drizzle-orm/type-tests/sqlite).
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free