Home / File/ select.types.ts — drizzle-orm Source File

select.types.ts — drizzle-orm Source File

Architecture documentation for select.types.ts, a typescript file in the drizzle-orm codebase. 13 imports, 9 dependents.

File typescript DrizzleORM QueryBuilders 13 imports 9 dependents 2 functions

Entity Profile

Dependency Diagram

graph LR
  18a5fcd5_994e_4f8e_c531_decae9341796["select.types.ts"]
  0246584b_d63a_06ad_4a46_dd97d5212ea8["session.ts"]
  18a5fcd5_994e_4f8e_c531_decae9341796 --> 0246584b_d63a_06ad_4a46_dd97d5212ea8
  b06d3b34_7e4c_4558_fa21_f40ea239b8a4["view-base.ts"]
  18a5fcd5_994e_4f8e_c531_decae9341796 --> b06d3b34_7e4c_4558_fa21_f40ea239b8a4
  d25d55b4_d8a4_6f19_2b5c_2ef3a5375746["view.ts"]
  18a5fcd5_994e_4f8e_c531_decae9341796 --> d25d55b4_d8a4_6f19_2b5c_2ef3a5375746
  49cf912b_062f_f482_ab61_a2b8c881ec4d["select.ts"]
  18a5fcd5_994e_4f8e_c531_decae9341796 --> 49cf912b_062f_f482_ab61_a2b8c881ec4d
  be483a7f_d5d7_7a9b_9a13_44a4a6aafbbd["sql.ts"]
  18a5fcd5_994e_4f8e_c531_decae9341796 --> be483a7f_d5d7_7a9b_9a13_44a4a6aafbbd
  21a1af42_6b20_ae23_eb1a_f0f50e662d62["index.ts"]
  18a5fcd5_994e_4f8e_c531_decae9341796 --> 21a1af42_6b20_ae23_eb1a_f0f50e662d62
  227c0a5e_dd35_a654_1766_5a30cb1b922f["table.ts"]
  18a5fcd5_994e_4f8e_c531_decae9341796 --> 227c0a5e_dd35_a654_1766_5a30cb1b922f
  ecce3253_1e75_a87f_27b3_ca87e81a3024["utils.ts"]
  18a5fcd5_994e_4f8e_c531_decae9341796 --> ecce3253_1e75_a87f_27b3_ca87e81a3024
  8809dea6_3f84_fb1a_7eed_e0d9bd54d799["operations.ts"]
  18a5fcd5_994e_4f8e_c531_decae9341796 --> 8809dea6_3f84_fb1a_7eed_e0d9bd54d799
  d31ad410_b8fc_5d88_a194_70aa7419676a["query-builder.ts"]
  18a5fcd5_994e_4f8e_c531_decae9341796 --> d31ad410_b8fc_5d88_a194_70aa7419676a
  8fb028b7_6ce0_27fa_29b6_39545ba11529["select.types.ts"]
  18a5fcd5_994e_4f8e_c531_decae9341796 --> 8fb028b7_6ce0_27fa_29b6_39545ba11529
  4d55618d_fa7b_8e54_edb2_b85ae393d95b["subquery.ts"]
  18a5fcd5_994e_4f8e_c531_decae9341796 --> 4d55618d_fa7b_8e54_edb2_b85ae393d95b
  1fd6ac27_a0fb_a054_a358_c8766c3fcbd7["table.ts"]
  18a5fcd5_994e_4f8e_c531_decae9341796 --> 1fd6ac27_a0fb_a054_a358_c8766c3fcbd7
  fd865152_2272_3ed9_2eb9_18c436f3e353["alias.ts"]
  fd865152_2272_3ed9_2eb9_18c436f3e353 --> 18a5fcd5_994e_4f8e_c531_decae9341796
  style 18a5fcd5_994e_4f8e_c531_decae9341796 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

import type { ColumnsSelection, Placeholder, SQL, View } from '~/sql/sql.ts';
import type { SQLiteColumn } from '~/sqlite-core/columns/index.ts';
import type { SQLiteTable, SQLiteTableWithColumns } from '~/sqlite-core/table.ts';
import type { Assume, ValidateShape } from '~/utils.ts';

import type {
	SelectedFields as SelectFieldsBase,
	SelectedFieldsFlat as SelectFieldsFlatBase,
	SelectedFieldsOrdered as SelectFieldsOrderedBase,
} from '~/operations.ts';
import type { TypedQueryBuilder } from '~/query-builders/query-builder.ts';
import type {
	AppendToNullabilityMap,
	AppendToResult,
	BuildSubquerySelection,
	GetSelectTableName,
	JoinNullability,
	JoinType,
	MapColumnsToTableAlias,
	SelectMode,
	SelectResult,
	SetOperator,
} from '~/query-builders/select.types.ts';
import type { Subquery } from '~/subquery.ts';
import type { Table, UpdateTableConfig } from '~/table.ts';
import type { SQLitePreparedQuery } from '../session.ts';
import type { SQLiteViewBase } from '../view-base.ts';
import type { SQLiteViewWithSelection } from '../view.ts';
import type { SQLiteSelectBase, SQLiteSelectQueryBuilderBase } from './select.ts';

export interface SQLiteSelectJoinConfig {
	on: SQL | undefined;
	table: SQLiteTable | Subquery | SQLiteViewBase | SQL;
	alias: string | undefined;
	joinType: JoinType;
}

export type BuildAliasTable<TTable extends SQLiteTable | View, TAlias extends string> = TTable extends Table
	? SQLiteTableWithColumns<
		UpdateTableConfig<TTable['_']['config'], {
			name: TAlias;
			columns: MapColumnsToTableAlias<TTable['_']['columns'], TAlias, 'sqlite'>;
		}>
	>
	: TTable extends View ? SQLiteViewWithSelection<
			TAlias,
			TTable['_']['existing'],
			MapColumnsToTableAlias<TTable['_']['selectedFields'], TAlias, 'sqlite'>
		>
	: never;

export interface SQLiteSelectConfig {
	withList?: Subquery[];
	fields: Record<string, unknown>;
	fieldsFlat?: SelectedFieldsOrdered;
	where?: SQL;
	having?: SQL;
	table: SQLiteTable | Subquery | SQLiteViewBase | SQL;
	limit?: number | Placeholder;
	offset?: number | Placeholder;
// ... (411 more lines)

Domain

Subdomains

Dependencies

Frequently Asked Questions

What does select.types.ts do?
select.types.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 select.types.ts?
select.types.ts defines 2 function(s): leftSelect, table.
What does select.types.ts depend on?
select.types.ts imports 13 module(s): index.ts, operations.ts, query-builder.ts, select.ts, select.types.ts, session.ts, sql.ts, subquery.ts, and 5 more.
What files import select.types.ts?
select.types.ts is imported by 9 file(s): alias.ts, db.ts, delete.ts, dialect.ts, insert.ts, query-builder.ts, select.ts, session.ts, and 1 more.
Where is select.types.ts in the architecture?
select.types.ts is located at drizzle-orm/src/sqlite-core/query-builders/select.types.ts (domain: DrizzleORM, subdomain: QueryBuilders, directory: drizzle-orm/src/sqlite-core/query-builders).

Analyze Your Own Codebase

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

Try Supermodel Free