import { DatabaseClient } from '../database/database-client.interface'; /** * PostgreSQL sequence configuration */ export interface SequenceConfig { name: string; schema?: string; startWith?: number; incrementBy?: number; minValue?: number; maxValue?: number; cache?: number; cycle?: boolean; } /** * Sequence instance for interacting with PostgreSQL sequences */ export declare class DbSequence { private client; private config; private qualifiedName; constructor(client: DatabaseClient, config: SequenceConfig); /** * Get the next value from the sequence */ nextValue(): Promise; /** * Get the current value of the sequence (without incrementing) */ currentValue(): Promise; /** * Set the sequence to a specific value */ resync(value: number): Promise; /** * Get the sequence configuration */ getConfig(): SequenceConfig; /** * Get the qualified sequence name (with schema if applicable) */ getQualifiedName(): string; } /** * Builder for creating sequence configurations */ export declare class SequenceBuilder { private config; constructor(name: string); /** * Set the schema for this sequence */ inSchema(schema: string): this; /** * Set the starting value */ startWith(value: number): this; /** * Set the increment value */ incrementBy(value: number): this; /** * Set minimum value */ minValue(value: number): this; /** * Set maximum value */ maxValue(value: number): this; /** * Set cache size */ cache(value: number): this; /** * Enable cycling (restart when reaching max/min value) */ cycle(): this; /** * Build the sequence configuration */ build(): SequenceConfig; } /** * Helper function to create a sequence builder */ export declare function sequence(name: string): SequenceBuilder; //# sourceMappingURL=sequence-builder.d.ts.map