Class SortingParams
- All Implemented Interfaces:
IParams
SORT command parameters.-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddParams(CommandArguments args) alpha()Sort lexicographicaly.asc()Get the Sorting in Ascending Order.by(byte[] pattern) Sort by weight in keys.Sort by weight in keys.desc()Get the Sorting in Descending Order.get(byte[]... patterns) Retrieving external keys from the result of the search.Retrieving external keys from the result of the search.Collection<byte[]> Deprecated.limit(int start, int count) Limit the Numbers of returned Elements.nosort()No sorting.sortingOrder(SortingOrder order) Get by the Sorting Order.
-
Field Details
-
params
-
-
Constructor Details
-
SortingParams
public SortingParams()
-
-
Method Details
-
by
Sort by weight in keys.Takes a pattern that is used in order to generate the key names of the weights used for sorting. Weight key names are obtained substituting the first occurrence of * with the actual value of the elements on the list.
The pattern for a normal key/value pair is "field*" and for a value in a hash "field*->fieldname".
- Parameters:
pattern-- Returns:
- the SortingParams Object
-
by
Sort by weight in keys.Takes a pattern that is used in order to generate the key names of the weights used for sorting. Weight key names are obtained substituting the first occurrence of * with the actual value of the elements on the list.
The pattern for a normal key/value pair is "field*" and for a value in a hash "field*->fieldname".
- Parameters:
pattern-- Returns:
- the SortingParams Object
-
nosort
No sorting.This is useful if you want to retrieve an external key (using
GET) but you don't want the sorting overhead.- Returns:
- the SortingParams Object
-
getParams
Deprecated. -
desc
Get the Sorting in Descending Order.- Returns:
- the sortingParams Object
-
asc
Get the Sorting in Ascending Order. This is the default order.- Returns:
- the SortingParams Object
-
sortingOrder
Get by the Sorting Order.- Parameters:
order- the Sorting order- Returns:
- the SortingParams object
-
limit
Limit the Numbers of returned Elements.- Parameters:
start- is zero basedcount-- Returns:
- the SortingParams Object
-
alpha
Sort lexicographicaly. Note that Redis is utf-8 aware assuming you set the right value for the LC_COLLATE environment variable.- Returns:
- the SortingParams Object
-
get
Retrieving external keys from the result of the search.Takes a pattern that is used in order to generate the key names of the result of sorting. The key names are obtained substituting the first occurrence of * with the actual value of the elements on the list.
The pattern for a normal key/value pair is "field*" and for a value in a hash "field*->fieldname".
To get the list itself use the char # as pattern.
- Parameters:
patterns-- Returns:
- the SortingParams Object
-
get
Retrieving external keys from the result of the search.Takes a pattern that is used in order to generate the key names of the result of sorting. The key names are obtained substituting the first occurrence of * with the actual value of the elements on the list.
The pattern for a normal key/value pair is "field*" and for a value in a hash "field*->fieldname".
To get the list itself use the char # as pattern.
- Parameters:
patterns-- Returns:
- the SortingParams Object
-
addParams
-