onOnly() — drizzle-orm Function Reference
Architecture documentation for the onOnly() function in indexes.ts from the drizzle-orm codebase.
Entity Profile
Dependency Diagram
graph TD b22e4141_d0f5_81e4_6c4c_8be1c3c98464["onOnly()"] 02429881_d882_e62b_a969_f07e1c11f572["IndexBuilderOn"] b22e4141_d0f5_81e4_6c4c_8be1c3c98464 -->|defined in| 02429881_d882_e62b_a969_f07e1c11f572 style b22e4141_d0f5_81e4_6c4c_8be1c3c98464 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
drizzle-orm/src/gel-core/indexes.ts lines 139–154
onOnly(...columns: [Partial<GelExtraConfigColumn | SQL>, ...Partial<GelExtraConfigColumn | SQL>[]]): IndexBuilder {
return new IndexBuilder(
columns.map((it) => {
if (is(it, SQL)) {
return it;
}
it = it as GelExtraConfigColumn;
const clonedIndexedColumn = new IndexedColumn(it.name, !!it.keyAsName, it.columnType!, it.indexConfig!);
it.indexConfig = it.defaultConfig;
return clonedIndexedColumn;
}),
this.unique,
true,
this.name,
);
}
Domain
Subdomains
Defined In
Source
Frequently Asked Questions
What does onOnly() do?
onOnly() is a function in the drizzle-orm codebase, defined in drizzle-orm/src/gel-core/indexes.ts.
Where is onOnly() defined?
onOnly() is defined in drizzle-orm/src/gel-core/indexes.ts at line 139.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free