Pip-Services-Commons-Dotnet
|
Data transfer object to pass paging parameters for queries. The page is defined by two parameters. The skip
parameter defines number of items to skip. The Paging parameter sets how many items to return in a page. And the optional total
parameter tells to return total number of items in the query.
More...
Public Member Functions | |
PagingParams () | |
Creates a new instance and sets its values. More... | |
PagingParams (object skip, object take, object total=null) | |
Creates a new instance and sets its values. More... | |
long | GetSkip (long minSkip=0) |
Gets the number of items to skip. More... | |
long | GetTake (long maxTake) |
Gets the number of items to return in a page. More... | |
override bool | Equals (object obj) |
override int | GetHashCode () |
Static Public Member Functions | |
static PagingParams | FromValue (object value) |
Converts specified value into PagingParams. More... | |
static PagingParams | FromTuples (params object[] tuples) |
Creates a new PagingParams from a list of key-value pairs called tuples. More... | |
static PagingParams | FromMap (AnyValueMap map) |
Creates a new PagingParams and sets it parameters from the AnyValueMap map More... | |
Properties | |
long | Skip [get, set] |
long | Take [get, set] |
bool | Total [get, set] |
Data transfer object to pass paging parameters for queries. The page is defined by two parameters. The skip
parameter defines number of items to skip. The Paging parameter sets how many items to return in a page. And the optional total
parameter tells to return total number of items in the query.
Remember: not all implementations support total
parameter because its generation may lead to severe performance implications.
PipServices3.Commons.Data.PagingParams.PagingParams | ( | ) |
Creates a new instance and sets its values.
PipServices3.Commons.Data.PagingParams.PagingParams | ( | object | skip, |
object | take, | ||
object | total = null |
||
) |
Creates a new instance and sets its values.
skip | the number of items to skip. |
take | the number of items to return. |
total | true to return the total number of items. |
|
static |
Creates a new PagingParams and sets it parameters from the AnyValueMap map
map | a AnyValueMap to initialize this PagingParams |
|
static |
Creates a new PagingParams from a list of key-value pairs called tuples.
tuples | a list of values where odd elements are keys and the following even elements are values |
|
static |
Converts specified value into PagingParams.
value | value to be converted |
long PipServices3.Commons.Data.PagingParams.GetSkip | ( | long | minSkip = 0 | ) |
Gets the number of items to skip.
minSkip | the minimum number of items to skip. |
long PipServices3.Commons.Data.PagingParams.GetTake | ( | long | maxTake | ) |
Gets the number of items to return in a page.
maxTake | the maximum number of items to return. |
|
getset |
The number of items to skip.
|
getset |
The number of items to return.
|
getset |
The flag to return the total number of items.