UNPKG

@configurator/ravendb

Version:
53 lines (52 loc) 2.44 kB
/// <reference path="../../../Types/readable-stream.d.ts" /> import { HttpRequestParameters } from "../../../Primitives/Http"; import { IOperation, OperationResultType } from "../OperationAbstractions"; import { CompareExchangeValue } from "./CompareExchangeValue"; import { CompareExchangeResultClass, ServerCasing, ServerResponse } from "../../../Types"; import { IDocumentStore } from "../../IDocumentStore"; import { DocumentConventions } from "../../Conventions/DocumentConventions"; import { HttpCache } from "../../../Http/HttpCache"; import { RavenCommand } from "../../../Http/RavenCommand"; import { ServerNode } from "../../../Http/ServerNode"; import { GetCompareExchangeValuesResponse } from "./CompareExchangeValueResultParser"; import * as stream from "readable-stream"; export interface GetCompareExchangeValuesParameters<T> { keys?: string[]; startWith?: string; start?: number; pageSize?: number; materializeMetadata?: boolean; clazz?: CompareExchangeResultClass<T>; } export declare class GetCompareExchangeValuesOperation<T> implements IOperation<{ [key: string]: CompareExchangeValue<T>; }> { private readonly _clazz; private readonly _keys; private readonly _startWith; private readonly _start; private readonly _pageSize; private readonly _materializeMetadata; get keys(): string[]; get startWith(): string; get start(): number; get pageSize(): number; get clazz(): CompareExchangeResultClass<T>; constructor(parameters: GetCompareExchangeValuesParameters<T>); getCommand(store: IDocumentStore, conventions: DocumentConventions, cache: HttpCache): RavenCommand<{ [key: string]: CompareExchangeValue<T>; }>; get resultType(): OperationResultType; } export declare class GetCompareExchangeValuesCommand<T> extends RavenCommand<{ [key: string]: CompareExchangeValue<T>; }> { private _operation; private readonly _materializeMetadata; private readonly _conventions; constructor(operation: GetCompareExchangeValuesOperation<T>, materializeMetadata: boolean, conventions: DocumentConventions); get isReadRequest(): boolean; createRequest(node: ServerNode): HttpRequestParameters; setResponseAsync(bodyStream: stream.Stream, fromCache: boolean): Promise<string>; static mapToLocalObject(json: ServerCasing<ServerResponse<GetCompareExchangeValuesResponse>>): GetCompareExchangeValuesResponse; }