substring() — drizzle-orm Function Reference
Architecture documentation for the substring() function in expressions.ts from the drizzle-orm codebase.
Entity Profile
Dependency Diagram
graph TD 3c33e9d4_5c15_bb1b_b855_a4d739e9b37f["substring()"] 49fe36d6_857d_2165_e992_502c24649a51["expressions.ts"] 3c33e9d4_5c15_bb1b_b855_a4d739e9b37f -->|defined in| 49fe36d6_857d_2165_e992_502c24649a51 style 3c33e9d4_5c15_bb1b_b855_a4d739e9b37f fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
drizzle-orm/src/mysql-core/expressions.ts lines 12–25
export function substring(
column: MySqlColumn | 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
Defined In
Source
Frequently Asked Questions
What does substring() do?
substring() is a function in the drizzle-orm codebase, defined in drizzle-orm/src/mysql-core/expressions.ts.
Where is substring() defined?
substring() is defined in drizzle-orm/src/mysql-core/expressions.ts at line 12.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free