Pip-Services-Commons-Dotnet
Public Member Functions | Static Public Member Functions | Static Private Member Functions | Static Private Attributes | List of all members
PipServices3.Commons.Data.ProjectionParams Class Reference

Defines projection parameters with list if fields to include into query results. More...

Inheritance diagram for PipServices3.Commons.Data.ProjectionParams:

Public Member Functions

 ProjectionParams ()
 Creates a new instance of the projection parameters. More...
 
 ProjectionParams (string[] values)
 Creates a new instance of the projection parameters and assigns its value. More...
 
 ProjectionParams (AnyValueArray array)
 Creates a new instance of the projection parameters and assigns its value. More...
 
override string ToString ()
 Gets a string representation of the object. The result is a comma-separated list of projection fields "field1,field2.field21,field2.field22.field221" More...
 

Static Public Member Functions

static ProjectionParams FromValue (object value)
 Converts specified value into ProjectionParams. More...
 
static ProjectionParams FromValues (params string[] values)
 Parses comma-separated list of projection fields. More...
 
static ProjectionParams FromValues (char delimiter, params string[] values)
 Parses comma-separated list of projection fields. More...
 

Static Private Member Functions

static string [] Parse (char delimiter, string[] values)
 
static void ParseValue (string prefix, List< string > result, string value, char delimiter)
 

Static Private Attributes

static char DefaultDelimiter = ','
 

Detailed Description

Defines projection parameters with list if fields to include into query results.

The parameters support two formats: dot format and nested format.

The dot format is the standard way to define included fields and subfields using dot object notation: "field1,field2.field21,field2.field22.field221"

As alternative the nested format offers a more compact representation: "field1,field2(field21,field22(field221))"

var filter = FilterParams.FromTuples("type", "Type1");
var paging = new PagingParams(0, 100);
var projection = ProjectionParams.fromString("field1,field2(field21,field22)")
myDataClient.GetDataByFilter(filter, paging, projection);

Constructor & Destructor Documentation

◆ ProjectionParams() [1/3]

PipServices3.Commons.Data.ProjectionParams.ProjectionParams ( )

Creates a new instance of the projection parameters.

◆ ProjectionParams() [2/3]

PipServices3.Commons.Data.ProjectionParams.ProjectionParams ( string []  values)

Creates a new instance of the projection parameters and assigns its value.

Parameters
values(optional) values to initialize this object.

◆ ProjectionParams() [3/3]

PipServices3.Commons.Data.ProjectionParams.ProjectionParams ( AnyValueArray  array)

Creates a new instance of the projection parameters and assigns its value.

Parameters
values(optional) values to initialize this object.

Member Function Documentation

◆ FromValue()

static ProjectionParams PipServices3.Commons.Data.ProjectionParams.FromValue ( object  value)
static

Converts specified value into ProjectionParams.

Parameters
valuevalue to be converted
Returns
a newly created ProjectionParams.

See AnyValueArray.FromValue(object)

◆ FromValues() [1/2]

static ProjectionParams PipServices3.Commons.Data.ProjectionParams.FromValues ( params string []  values)
static

Parses comma-separated list of projection fields.

Parameters
valuesone or more comma-separated lists of projection fields
Returns
a newly created ProjectionParams.

◆ FromValues() [2/2]

static ProjectionParams PipServices3.Commons.Data.ProjectionParams.FromValues ( char  delimiter,
params string []  values 
)
static

Parses comma-separated list of projection fields.

Parameters
delimitera certain type of delimiter
valuesone or more comma-separated lists of projection fields
Returns
a newly created ProjectionParams.

◆ ToString()

override string PipServices3.Commons.Data.ProjectionParams.ToString ( )

Gets a string representation of the object. The result is a comma-separated list of projection fields "field1,field2.field21,field2.field22.field221"

Returns
a string representation of the object.

The documentation for this class was generated from the following file: