1 | import { CppMutationToken } from './binding';
|
2 | /**
|
3 | * Represents the mutation token returned by the server.
|
4 | *
|
5 | * @see {@link MutationState}
|
6 | */
|
7 | export interface MutationToken {
|
8 | /**
|
9 | * Generates a string representation of this mutation token.
|
10 | */
|
11 | toString(): string;
|
12 | /**
|
13 | * Generates a JSON representation of this mutation token.
|
14 | */
|
15 | toJSON(): any;
|
16 | }
|
17 | /**
|
18 | * Aggregates a number of {@link MutationToken}'s which have been returned by mutation
|
19 | * operations, which can then be used when performing queries. This will guarenteed
|
20 | * that the query includes the specified set of mutations without incurring the wait
|
21 | * associated with request_plus level consistency.
|
22 | */
|
23 | export declare class MutationState {
|
24 | /**
|
25 | * @internal
|
26 | */
|
27 | _data: {
|
28 | [bucketName: string]: {
|
29 | [vbId: number]: CppMutationToken;
|
30 | };
|
31 | };
|
32 | constructor(...tokens: MutationToken[]);
|
33 | /**
|
34 | * Adds a set of tokens to this state.
|
35 | *
|
36 | * @param tokens The tokens to add.
|
37 | */
|
38 | add(...tokens: MutationToken[]): void;
|
39 | private _addOne;
|
40 | /**
|
41 | * @internal
|
42 | */
|
43 | toJSON(): any;
|
44 | /**
|
45 | * @internal
|
46 | */
|
47 | inspect(): string;
|
48 | }
|