1 | /**
|
2 | * Defines projection parameters with list if fields to include into query results.
|
3 | *
|
4 | * The parameters support two formats: dot format and nested format.
|
5 | *
|
6 | * The dot format is the standard way to define included fields and subfields using
|
7 | * dot object notation: <code>"field1,field2.field21,field2.field22.field221"</code>.
|
8 | *
|
9 | * As alternative the nested format offers a more compact representation:
|
10 | * <code>"field1,field2(field21,field22(field221))"</code>.
|
11 | *
|
12 | * ### Example ###
|
13 | *
|
14 | * let filter = FilterParams.fromTuples("type", "Type1");
|
15 | * let paging = new PagingParams(0, 100);
|
16 | * let projection = ProjectionParams.fromString("field1,field2(field21,field22)")
|
17 | *
|
18 | * myDataClient.getDataByFilter(filter, paging, projection, (err, page) => {...});
|
19 | *
|
20 | */
|
21 | export declare class ProjectionParams extends Array<string> {
|
22 | /**
|
23 | * Creates a new instance of the projection parameters and assigns its value.
|
24 | *
|
25 | * @param value (optional) values to initialize this object.
|
26 | */
|
27 | constructor(values?: any[]);
|
28 | /**
|
29 | * Gets a string representation of the object.
|
30 | * The result is a comma-separated list of projection fields
|
31 | * "field1,field2.field21,field2.field22.field221"
|
32 | *
|
33 | * @returns a string representation of the object.
|
34 | */
|
35 | toString(): string;
|
36 | private static parseValue;
|
37 | /**
|
38 | * Converts specified value into ProjectionParams.
|
39 | *
|
40 | * @param value value to be converted
|
41 | * @returns a newly created ProjectionParams.
|
42 | *
|
43 | * @see [[AnyValueArray.fromValue]]
|
44 | */
|
45 | static fromValue(value: any): ProjectionParams;
|
46 | /**
|
47 | * Parses comma-separated list of projection fields.
|
48 | *
|
49 | * @param values one or more comma-separated lists of projection fields
|
50 | * @returns a newly created ProjectionParams.
|
51 | */
|
52 | static fromString(...values: string[]): ProjectionParams;
|
53 | }
|