UNPKG

ravendb

Version:
29 lines 1.47 kB
import { IndexDefinition } from "./IndexDefinition.js"; import { IndexingMapDefinition, IndexingMapUtils, IndexingReduceDefinition } from "./StronglyTyped.js"; import { DocumentType } from "../DocumentAbstractions.js"; import { BaseJavaScriptIndexCreationTask } from "./BaseJavaScriptIndexCreationTask.js"; export declare class AbstractJavaScriptIndexCreationTask<TDocument extends object, TMapResult extends object = any> extends BaseJavaScriptIndexCreationTask<keyof TMapResult & string> { private _map; private _reduce; protected constructor(); /** * Register map * @param collectionOrDocumentType Collection name to index over * @param definition Index definition that maps to the indexed properties */ map(collectionOrDocumentType: string | DocumentType<TDocument>, definition: IndexingMapDefinition<TDocument, TMapResult>): void; /** * Sets the index definition reduce * @param mapReduce Reduce definition */ reduce(mapReduce: IndexingReduceDefinition<TMapResult>): void; addSource(source: Function): void; addSource(name: string, source: Function): void; /** * No implementation is required here, the interface is purely meant to expose map helper methods such as `load(id, collection)` etc */ mapUtils(): IndexingMapUtils; get isMapReduce(): boolean; createIndexDefinition(): IndexDefinition; } //# sourceMappingURL=AbstractJavaScriptIndexCreationTask.d.ts.map