expressions.ts — drizzle-orm Source File
Architecture documentation for expressions.ts, a typescript file in the drizzle-orm codebase. 3 imports, 0 dependents.
Entity Profile
Dependency Diagram
graph LR 19367890_9a90_5f36_f3c2_93a737b35661["expressions.ts"] 63414497_7c3c_fa30_3735_57e9e37ccc7c["index.ts"] 19367890_9a90_5f36_f3c2_93a737b35661 --> 63414497_7c3c_fa30_3735_57e9e37ccc7c 5c46beaf_8b59_d2e3_def3_8af6daf1fccd["index.ts"] 19367890_9a90_5f36_f3c2_93a737b35661 --> 5c46beaf_8b59_d2e3_def3_8af6daf1fccd be483a7f_d5d7_7a9b_9a13_44a4a6aafbbd["sql.ts"] 19367890_9a90_5f36_f3c2_93a737b35661 --> be483a7f_d5d7_7a9b_9a13_44a4a6aafbbd style 19367890_9a90_5f36_f3c2_93a737b35661 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
import type { GelColumn } from '~/gel-core/columns/index.ts';
import { bindIfParam } from '~/sql/expressions/index.ts';
import type { Placeholder, SQL, SQLChunk, SQLWrapper } from '~/sql/sql.ts';
import { sql } from '~/sql/sql.ts';
export * from '~/sql/expressions/index.ts';
export function concat(column: GelColumn | SQL.Aliased, value: string | Placeholder | SQLWrapper): SQL {
return sql`${column} || ${bindIfParam(value, column)}`;
}
export function substring(
column: GelColumn | SQL.Aliased,
{ from, for: _for }: { from?: number | Placeholder | SQLWrapper; for?: number | Placeholder | SQLWrapper },
): SQL {
const chunks: SQLChunk[] = [sql`substring(`, column];
if (from !== undefined) {
chunks.push(sql` from `, bindIfParam(from, column));
}
if (_for !== undefined) {
chunks.push(sql` for `, bindIfParam(_for, column));
}
chunks.push(sql`)`);
return sql.join(chunks);
}
Domain
Subdomains
Functions
Dependencies
- index.ts
- index.ts
- sql.ts
Source
Frequently Asked Questions
What does expressions.ts do?
expressions.ts is a source file in the drizzle-orm codebase, written in typescript. It belongs to the DrizzleORM domain, RelationalQuery subdomain.
What functions are defined in expressions.ts?
expressions.ts defines 2 function(s): concat, substring.
What does expressions.ts depend on?
expressions.ts imports 3 module(s): index.ts, index.ts, sql.ts.
Where is expressions.ts in the architecture?
expressions.ts is located at drizzle-orm/src/gel-core/expressions.ts (domain: DrizzleORM, subdomain: RelationalQuery, directory: drizzle-orm/src/gel-core).
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free