UNPKG

@configurator/ravendb

Version:
25 lines (24 loc) 900 B
import { IDocumentStore } from "../IDocumentStore"; import { HiloRangeValue } from "./HiloRangeValue"; import { NextId } from "./NextId"; export declare class HiloIdGenerator { private _store; private readonly _tag; protected _prefix?: string; private _lastBatchSize; private _lastRangeAt; private readonly _dbName; private readonly _identityPartsSeparator; private _range; private _serverTag; private _nextRangeTask; constructor(tag: string, store: IDocumentStore, dbName: string, identityPartsSeparator: string); protected _getDocumentIdFromId(nextId: number): string; generateDocumentId(entity: object): Promise<string>; getNextId(): Promise<NextId>; nextId(): Promise<number>; protected _getNextRange(): Promise<void>; returnUnusedRange(): Promise<void>; get range(): HiloRangeValue; set range(value: HiloRangeValue); }