Home / File/ sequence.ts — drizzle-orm Source File

sequence.ts — drizzle-orm Source File

Architecture documentation for sequence.ts, a typescript file in the drizzle-orm codebase. 1 imports, 2 dependents.

File typescript DrizzleORM RelationalQuery 1 imports 2 dependents 3 functions 1 classes

Entity Profile

Dependency Diagram

graph LR
  37aabffb_158c_feb8_20e6_26334698593c["sequence.ts"]
  27705a9d_afe9_57dd_8c97_e52d8a67d426["entity.ts"]
  37aabffb_158c_feb8_20e6_26334698593c --> 27705a9d_afe9_57dd_8c97_e52d8a67d426
  5fdca641_932c_bf0c_9007_2ff637d9c705["int.common.ts"]
  5fdca641_932c_bf0c_9007_2ff637d9c705 --> 37aabffb_158c_feb8_20e6_26334698593c
  a24fdf3c_9905_a1c9_be31_c88bf0a5c079["schema.ts"]
  a24fdf3c_9905_a1c9_be31_c88bf0a5c079 --> 37aabffb_158c_feb8_20e6_26334698593c
  style 37aabffb_158c_feb8_20e6_26334698593c fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

import { entityKind, is } from '~/entity.ts';

export type GelSequenceOptions = {
	increment?: number | string;
	minValue?: number | string;
	maxValue?: number | string;
	startWith?: number | string;
	cache?: number | string;
	cycle?: boolean;
};

export class GelSequence {
	static readonly [entityKind]: string = 'GelSequence';

	constructor(
		public readonly seqName: string | undefined,
		public readonly seqOptions: GelSequenceOptions | undefined,
		public readonly schema: string | undefined,
	) {
	}
}

export function gelSequence(
	name: string,
	options?: GelSequenceOptions,
): GelSequence {
	return gelSequenceWithSchema(name, options, undefined);
}

/** @internal */
export function gelSequenceWithSchema(
	name: string,
	options?: GelSequenceOptions,
	schema?: string,
): GelSequence {
	return new GelSequence(name, options, schema);
}

export function isGelSequence(obj: unknown): obj is GelSequence {
	return is(obj, GelSequence);
}

Domain

Subdomains

Classes

Dependencies

  • entity.ts

Frequently Asked Questions

What does sequence.ts do?
sequence.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 sequence.ts?
sequence.ts defines 3 function(s): gelSequence, gelSequenceWithSchema, isGelSequence.
What does sequence.ts depend on?
sequence.ts imports 1 module(s): entity.ts.
What files import sequence.ts?
sequence.ts is imported by 2 file(s): int.common.ts, schema.ts.
Where is sequence.ts in the architecture?
sequence.ts is located at drizzle-orm/src/gel-core/sequence.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