schema.ts — drizzle-orm Source File
Architecture documentation for schema.ts, a typescript file in the drizzle-orm codebase. 3 imports, 0 dependents.
Entity Profile
Dependency Diagram
graph LR 2f67ade2_8a8a_0864_71bf_f9375ea06109["schema.ts"] 3c5f95cc_22b6_3d0d_d9be_3e274450e9e7["table.ts"] 2f67ade2_8a8a_0864_71bf_f9375ea06109 --> 3c5f95cc_22b6_3d0d_d9be_3e274450e9e7 c2bf33cf_2c60_b5d0_956c_7bd00c4f94ba["singlestoreTableWithSchema"] 2f67ade2_8a8a_0864_71bf_f9375ea06109 --> c2bf33cf_2c60_b5d0_956c_7bd00c4f94ba 27705a9d_afe9_57dd_8c97_e52d8a67d426["entity.ts"] 2f67ade2_8a8a_0864_71bf_f9375ea06109 --> 27705a9d_afe9_57dd_8c97_e52d8a67d426 style 2f67ade2_8a8a_0864_71bf_f9375ea06109 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
import { entityKind, is } from '~/entity.ts';
import { type SingleStoreTableFn, singlestoreTableWithSchema } from './table.ts';
/* import { type singlestoreView, singlestoreViewWithSchema } from './view.ts'; */
export class SingleStoreSchema<TName extends string = string> {
static readonly [entityKind]: string = 'SingleStoreSchema';
constructor(
public readonly schemaName: TName,
) {}
table: SingleStoreTableFn<TName> = (name, columns, extraConfig) => {
return singlestoreTableWithSchema(name, columns, extraConfig, this.schemaName);
};
/*
view = ((name, columns) => {
return singlestoreViewWithSchema(name, columns, this.schemaName);
}) as typeof singlestoreView; */
}
/** @deprecated - use `instanceof SingleStoreSchema` */
export function isSingleStoreSchema(obj: unknown): obj is SingleStoreSchema {
return is(obj, SingleStoreSchema);
}
/**
* Create a SingleStore schema.
* https://docs.singlestore.com/cloud/create-a-database/
*
* @param name singlestore use schema name
* @returns SingleStore schema
*/
export function singlestoreDatabase<TName extends string>(name: TName) {
return new SingleStoreSchema(name);
}
/**
* @see singlestoreDatabase
*/
export const singlestoreSchema = singlestoreDatabase;
Domain
Subdomains
Classes
Dependencies
- entity.ts
- singlestoreTableWithSchema
- table.ts
Source
Frequently Asked Questions
What does schema.ts do?
schema.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 schema.ts?
schema.ts defines 2 function(s): isSingleStoreSchema, singlestoreDatabase.
What does schema.ts depend on?
schema.ts imports 3 module(s): entity.ts, singlestoreTableWithSchema, table.ts.
Where is schema.ts in the architecture?
schema.ts is located at drizzle-orm/src/singlestore-core/schema.ts (domain: DrizzleORM, subdomain: RelationalQuery, directory: drizzle-orm/src/singlestore-core).
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free