v2.ts — drizzle-orm Source File
Architecture documentation for v2.ts, a typescript file in the drizzle-orm codebase. 2 imports, 1 dependents.
Entity Profile
Dependency Diagram
graph LR 78da996c_90cc_6154_e2a5_4b2639015e5b["v2.ts"] e5cee001_0354_7e76_ef0a_06dca71dc8ce["Generators.ts"] 78da996c_90cc_6154_e2a5_4b2639015e5b --> e5cee001_0354_7e76_ef0a_06dca71dc8ce ed06208c_acc0_01d6_56b8_07543e9ba1e5["pure-rand"] 78da996c_90cc_6154_e2a5_4b2639015e5b --> ed06208c_acc0_01d6_56b8_07543e9ba1e5 4d8b9b0c_75c6_bc65_84d3_d5e3192386e2["GeneratorFuncs.ts"] 4d8b9b0c_75c6_bc65_84d3_d5e3192386e2 --> 78da996c_90cc_6154_e2a5_4b2639015e5b style 78da996c_90cc_6154_e2a5_4b2639015e5b fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
/* eslint-disable drizzle-internal/require-entity-kind */
import prand from 'pure-rand';
import { AbstractGenerator } from '../Generators.ts';
export class GenerateUniqueIntervalV2 extends AbstractGenerator<{
fields?:
| 'year'
| 'month'
| 'day'
| 'hour'
| 'minute'
| 'second'
| 'year to month'
| 'day to hour'
| 'day to minute'
| 'day to second'
| 'hour to minute'
| 'hour to second'
| 'minute to second';
isUnique?: boolean;
}> {
static override readonly 'entityKind': string = 'GenerateUniqueInterval';
static override readonly version: number = 2;
private state: {
rng: prand.RandomGenerator;
fieldsToGenerate: string[];
intervalSet: Set<string>;
} | undefined;
public override isUnique = true;
private config: { [key: string]: { from: number; to: number } } = {
year: {
from: 0,
to: 5,
},
month: {
from: 0,
to: 11,
},
day: {
from: 0,
to: 29,
},
hour: {
from: 0,
to: 23,
},
minute: {
from: 0,
to: 59,
},
second: {
from: 0,
to: 59,
},
};
override init({ count, seed }: { count: number; seed: number }) {
const allFields = ['year', 'month', 'day', 'hour', 'minute', 'second'];
let fieldsToGenerate: string[] = allFields;
// ... (173 more lines)
Domain
Subdomains
Dependencies
- Generators.ts
- pure-rand
Imported By
Source
Frequently Asked Questions
What does v2.ts do?
v2.ts is a source file in the drizzle-orm codebase, written in typescript. It belongs to the DrizzleSeed domain, SeedOrchestration subdomain.
What does v2.ts depend on?
v2.ts imports 2 module(s): Generators.ts, pure-rand.
What files import v2.ts?
v2.ts is imported by 1 file(s): GeneratorFuncs.ts.
Where is v2.ts in the architecture?
v2.ts is located at drizzle-seed/src/services/versioning/v2.ts (domain: DrizzleSeed, subdomain: SeedOrchestration, directory: drizzle-seed/src/services/versioning).
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free