Home / File/ update.ts — drizzle-orm Source File

update.ts — drizzle-orm Source File

Architecture documentation for update.ts, a typescript file in the drizzle-orm codebase. 19 imports, 1 dependents.

File typescript DrizzleORM QueryBuilders 19 imports 1 dependents 1 functions 2 classes

Entity Profile

Dependency Diagram

graph LR
  956cc921_a752_6eef_2068_90c91a3cc0a7["update.ts"]
  a74dd48d_d5e3_6bb4_19c7_1954c9126816["common.ts"]
  956cc921_a752_6eef_2068_90c91a3cc0a7 --> a74dd48d_d5e3_6bb4_19c7_1954c9126816
  9cb8488e_0ece_edef_af6a_5851d56cddda["utils.ts"]
  956cc921_a752_6eef_2068_90c91a3cc0a7 --> 9cb8488e_0ece_edef_af6a_5851d56cddda
  0c3d6e7d_2a20_2e20_4164_7f373e4ec319["extractUsedTable"]
  956cc921_a752_6eef_2068_90c91a3cc0a7 --> 0c3d6e7d_2a20_2e20_4164_7f373e4ec319
  be86042a_e0e2_e322_228e_e182ac8bd699["view-base.ts"]
  956cc921_a752_6eef_2068_90c91a3cc0a7 --> be86042a_e0e2_e322_228e_e182ac8bd699
  1802ae0d_e56f_7575_eb4a_b95e50f061c0["select.types.ts"]
  956cc921_a752_6eef_2068_90c91a3cc0a7 --> 1802ae0d_e56f_7575_eb4a_b95e50f061c0
  05f0a280_d0c9_693a_a4bf_83cc671012d2["column.ts"]
  956cc921_a752_6eef_2068_90c91a3cc0a7 --> 05f0a280_d0c9_693a_a4bf_83cc671012d2
  27705a9d_afe9_57dd_8c97_e52d8a67d426["entity.ts"]
  956cc921_a752_6eef_2068_90c91a3cc0a7 --> 27705a9d_afe9_57dd_8c97_e52d8a67d426
  f86d3f7c_7b46_5b9f_94e2_ac0a5f48d903["dialect.ts"]
  956cc921_a752_6eef_2068_90c91a3cc0a7 --> f86d3f7c_7b46_5b9f_94e2_ac0a5f48d903
  90dfe595_29ab_0495_4263_3b19b4bb4d9b["session.ts"]
  956cc921_a752_6eef_2068_90c91a3cc0a7 --> 90dfe595_29ab_0495_4263_3b19b4bb4d9b
  c1a47e5e_63aa_1ab2_abac_86e509f63e7c["table.ts"]
  956cc921_a752_6eef_2068_90c91a3cc0a7 --> c1a47e5e_63aa_1ab2_abac_86e509f63e7c
  8fb028b7_6ce0_27fa_29b6_39545ba11529["select.types.ts"]
  956cc921_a752_6eef_2068_90c91a3cc0a7 --> 8fb028b7_6ce0_27fa_29b6_39545ba11529
  6acf5c54_62a7_1da1_984a_7374cbb9983e["query-promise.ts"]
  956cc921_a752_6eef_2068_90c91a3cc0a7 --> 6acf5c54_62a7_1da1_984a_7374cbb9983e
  05d1039e_d7d0_0fa1_6f52_956655638080["runnable-query.ts"]
  956cc921_a752_6eef_2068_90c91a3cc0a7 --> 05d1039e_d7d0_0fa1_6f52_956655638080
  591617cf_1376_c0a1_4ba1_ecd59ca13a5b["selection-proxy.ts"]
  956cc921_a752_6eef_2068_90c91a3cc0a7 --> 591617cf_1376_c0a1_4ba1_ecd59ca13a5b
  style 956cc921_a752_6eef_2068_90c91a3cc0a7 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

import type { GetColumnData } from '~/column.ts';
import { entityKind, is } from '~/entity.ts';
import type { GelDialect } from '~/gel-core/dialect.ts';
import type {
	GelPreparedQuery,
	GelQueryResultHKT,
	GelQueryResultKind,
	GelSession,
	PreparedQueryConfig,
} from '~/gel-core/session.ts';
import { GelTable } from '~/gel-core/table.ts';
import type {
	AppendToNullabilityMap,
	AppendToResult,
	GetSelectTableName,
	GetSelectTableSelection,
	JoinNullability,
	JoinType,
	SelectMode,
	SelectResult,
} from '~/query-builders/select.types.ts';
import { QueryPromise } from '~/query-promise.ts';
import type { RunnableQuery } from '~/runnable-query.ts';
import { SelectionProxyHandler } from '~/selection-proxy.ts';
import { type ColumnsSelection, type Query, SQL, type SQLWrapper } from '~/sql/sql.ts';
import { Subquery } from '~/subquery.ts';
import { Table } from '~/table.ts';
import {
	type Assume,
	getTableLikeName,
	mapUpdateSet,
	type NeonAuthToken,
	orderSelectedFields,
	type UpdateSet,
} from '~/utils.ts';
import { ViewBaseConfig } from '~/view-common.ts';
import type { GelColumn } from '../columns/common.ts';
import { extractUsedTable } from '../utils.ts';
import type { GelViewBase } from '../view-base.ts';
import type { GelSelectJoinConfig, SelectedFields, SelectedFieldsOrdered } from './select.types.ts';

export interface GelUpdateConfig {
	where?: SQL | undefined;
	set: UpdateSet;
	table: GelTable;
	from?: GelTable | Subquery | GelViewBase | SQL;
	joins: GelSelectJoinConfig[];
	returning?: SelectedFieldsOrdered;
	withList?: Subquery[];
}

export type GelUpdateSetSource<TTable extends GelTable> =
	& {
		[Key in keyof TTable['$inferInsert']]?:
			| GetColumnData<TTable['_']['columns'][Key]>
			| SQL
			| GelColumn;
	}
	& {};

// ... (502 more lines)

Domain

Subdomains

Functions

Dependencies

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, QueryBuilders subdomain.
What functions are defined in update.ts?
update.ts defines 1 function(s): table.
What does update.ts depend on?
update.ts imports 19 module(s): column.ts, common.ts, dialect.ts, entity.ts, extractUsedTable, query-promise.ts, runnable-query.ts, select.types.ts, and 11 more.
What files import update.ts?
update.ts is imported by 1 file(s): insert.ts.
Where is update.ts in the architecture?
update.ts is located at drizzle-orm/src/gel-core/query-builders/update.ts (domain: DrizzleORM, subdomain: QueryBuilders, directory: drizzle-orm/src/gel-core/query-builders).

Analyze Your Own Codebase

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

Try Supermodel Free