tables.ts — drizzle-orm Source File
Architecture documentation for tables.ts, a typescript file in the drizzle-orm codebase. 11 imports, 6 dependents.
Entity Profile
Dependency Diagram
graph LR caa15051_4c2c_cd8b_fcc3_001b783b7336["tables.ts"] 02ee7a70_490f_3b80_fa60_d59aaa62cd1d["db.ts"] caa15051_4c2c_cd8b_fcc3_001b783b7336 --> 02ee7a70_490f_3b80_fa60_d59aaa62cd1d 90067f6e_33cd_67c4_3575_3758cdacb6e2["gel"] caa15051_4c2c_cd8b_fcc3_001b783b7336 --> 90067f6e_33cd_67c4_3575_3758cdacb6e2 3f58c8f4_b305_acb0_933a_0541231c5109["node:crypto"] caa15051_4c2c_cd8b_fcc3_001b783b7336 --> 3f58c8f4_b305_acb0_933a_0541231c5109 25b05299_f48f_bceb_01ca_1343d330a8f7["utils.ts"] caa15051_4c2c_cd8b_fcc3_001b783b7336 --> 25b05299_f48f_bceb_01ca_1343d330a8f7 f242f86a_1919_1eea_5ea1_6bd6d55d9fde["relative-duration.ts"] caa15051_4c2c_cd8b_fcc3_001b783b7336 --> f242f86a_1919_1eea_5ea1_6bd6d55d9fde 076448f5_e30d_7700_bbe9_f5d1e76b579a["index.ts"] caa15051_4c2c_cd8b_fcc3_001b783b7336 --> 076448f5_e30d_7700_bbe9_f5d1e76b579a cd743ad3_7c7e_8832_84a3_6fe8c71161b4["schema.ts"] caa15051_4c2c_cd8b_fcc3_001b783b7336 --> cd743ad3_7c7e_8832_84a3_6fe8c71161b4 5c46beaf_8b59_d2e3_def3_8af6daf1fccd["index.ts"] caa15051_4c2c_cd8b_fcc3_001b783b7336 --> 5c46beaf_8b59_d2e3_def3_8af6daf1fccd be483a7f_d5d7_7a9b_9a13_44a4a6aafbbd["sql.ts"] caa15051_4c2c_cd8b_fcc3_001b783b7336 --> be483a7f_d5d7_7a9b_9a13_44a4a6aafbbd 1fd6ac27_a0fb_a054_a358_c8766c3fcbd7["table.ts"] caa15051_4c2c_cd8b_fcc3_001b783b7336 --> 1fd6ac27_a0fb_a054_a358_c8766c3fcbd7 ecce3253_1e75_a87f_27b3_ca87e81a3024["utils.ts"] caa15051_4c2c_cd8b_fcc3_001b783b7336 --> ecce3253_1e75_a87f_27b3_ca87e81a3024 088657ce_fef2_40cc_4c72_7ce1100757ad["delete.ts"] 088657ce_fef2_40cc_4c72_7ce1100757ad --> caa15051_4c2c_cd8b_fcc3_001b783b7336 a7b63847_327c_3e95_76ec_514d8b339928["insert.ts"] a7b63847_327c_3e95_76ec_514d8b339928 --> caa15051_4c2c_cd8b_fcc3_001b783b7336 0505a95a_e118_0be5_0841_09d89e1e3487["other.ts"] 0505a95a_e118_0be5_0841_09d89e1e3487 --> caa15051_4c2c_cd8b_fcc3_001b783b7336 style caa15051_4c2c_cd8b_fcc3_001b783b7336 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
import { DateDuration, Duration, LocalDate, LocalDateTime, RelativeDuration } from 'gel';
import crypto from 'node:crypto';
import type { Equal } from 'type-tests/utils.ts';
import { Expect } from 'type-tests/utils.ts';
import { relDuration } from '~/gel-core/columns/relative-duration.ts';
import {
bigint,
bigintT,
boolean,
check,
dateDuration,
decimal,
doublePrecision,
duration,
foreignKey,
type GelColumn,
gelTable,
type GelTableWithColumns,
index,
integer,
json,
localDate,
primaryKey,
real,
smallint,
text,
timestamp,
timestamptz,
uniqueIndex,
uuid,
} from '~/gel-core/index.ts';
import { gelSchema } from '~/gel-core/schema.ts';
import { eq } from '~/sql/expressions/index.ts';
import { sql } from '~/sql/sql.ts';
import type { InferInsertModel, InferSelectModel } from '~/table.ts';
import type { Simplify } from '~/utils.ts';
import { db } from './db.ts';
// export const myEnum = gelEnum('my_enum', ['a', 'b', 'c']);
export const identityColumnsTable = gelTable('identity_columns_table', {
generatedCol: integer('generated_col').generatedAlwaysAs(1),
alwaysAsIdentity: integer('always_as_identity').generatedAlwaysAsIdentity(),
byDefaultAsIdentity: integer('by_default_as_identity').generatedByDefaultAsIdentity(),
name: text('name'),
});
Expect<Equal<InferSelectModel<typeof identityColumnsTable>, typeof identityColumnsTable['$inferSelect']>>;
Expect<Equal<InferSelectModel<typeof identityColumnsTable>, typeof identityColumnsTable['_']['inferSelect']>>;
Expect<Equal<InferInsertModel<typeof identityColumnsTable>, typeof identityColumnsTable['$inferInsert']>>;
Expect<Equal<InferInsertModel<typeof identityColumnsTable>, typeof identityColumnsTable['_']['inferInsert']>>;
Expect<
Equal<
InferInsertModel<typeof identityColumnsTable, { dbColumnNames: false; override: true }>,
Simplify<typeof identityColumnsTable['$inferInsert'] & { alwaysAsIdentity?: number | undefined }>
>
>;
Expect<
Equal<
InferInsertModel<typeof identityColumnsTable, { dbColumnNames: false; override: true }>,
// ... (886 more lines)
Domain
Subdomains
Types
Dependencies
- db.ts
- gel
- index.ts
- index.ts
- node:crypto
- relative-duration.ts
- schema.ts
- sql.ts
- table.ts
- utils.ts
- utils.ts
Imported By
Source
Frequently Asked Questions
What does tables.ts do?
tables.ts is a source file in the drizzle-orm codebase, written in typescript. It belongs to the DrizzleORM domain, DatabaseDrivers subdomain.
What functions are defined in tables.ts?
tables.ts defines 5 function(s): cities, cities2, citiesCustom, getUsersTable, users.
What does tables.ts depend on?
tables.ts imports 11 module(s): db.ts, gel, index.ts, index.ts, node:crypto, relative-duration.ts, schema.ts, sql.ts, and 3 more.
What files import tables.ts?
tables.ts is imported by 6 file(s): delete.ts, insert.ts, other.ts, select.ts, set-operators.ts, update.ts.
Where is tables.ts in the architecture?
tables.ts is located at drizzle-orm/type-tests/geldb/tables.ts (domain: DrizzleORM, subdomain: DatabaseDrivers, directory: drizzle-orm/type-tests/geldb).
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free