ListExp Class

Aerospike
List expression generator. See Exp.

The bin expression argument in these methods can be a reference to a bin or the result of another expression. Expressions that modify bin values are only used for temporary expression evaluation and are not permanently applied to the bin.

List modify expressions return the bin's value. This value will be a list except when the list is nested within a map. In that case, a map is returned for the list modify expression.

List expressions support negative indexing. If the index is negative, the resolved index starts backwards from end of list. If an index is out of bounds, a parameter error will be returned. If a range is partially out of bounds, the valid part of the range will be returned. Index/Range examples:

  • Index 0: First item in list.
  • Index 4: Fifth item in list.
  • Index -1: Last item in list.
  • Index -3: Third to last item in list.
  • Index 1 Count 2: Second and third items in list.
  • Index -3 Count 3: Last three items in list.
  • Index -5 Count 4: Range between fifth to last item to second to last item inclusive.

Nested expressions are supported by optional CTX context arguments. Example:

  • bin = [[7,9,5],[1,2,3],[6,5,4,1]]
  • Get size of last list.
  • ListExp.size(Exp.ListBin("bin"), CTX.listIndex(-1))
  • result = 4

Inheritance Hierarchy

SystemObject
  Aerospike.ClientListExp

Namespace:  Aerospike.Client
Assembly:  AerospikeClient (in AerospikeClient.dll) Version: 5.1.1.0 (5.1.1)
Syntax

C#
public sealed class ListExp

The ListExp type exposes the following members.

Constructors

  NameDescription
Public methodListExp
Initializes a new instance of the ListExp class
Top
Methods

  NameDescription
Public methodStatic memberAppend
Create expression that appends list items to end of list.
Public methodStatic memberAppendItems
Create expression that appends list items to end of list.
Public methodStatic memberClear
Create expression that removes all items in list.
Public methodStatic memberCode exampleGetByIndex
Create expression that selects list item identified by index and returns selected data specified by returnType.
Public methodStatic memberGetByIndexRange(ListReturnType, Exp, Exp, CTX)
Create expression that selects list items starting at specified index to the end of list and returns selected data specified by returnType.
Public methodStatic memberGetByIndexRange(ListReturnType, Exp, Exp, Exp, CTX)
Create expression that selects "count" list items starting at specified index and returns selected data specified by returnType.
Public methodStatic memberCode exampleGetByRank
Create expression that selects list item identified by rank and returns selected data specified by returnType.
Public methodStatic memberGetByRankRange(ListReturnType, Exp, Exp, CTX)
Create expression that selects list items starting at specified rank to the last ranked item and returns selected data specified by returnType.
Public methodStatic memberGetByRankRange(ListReturnType, Exp, Exp, Exp, CTX)
Create expression that selects "count" list items starting at specified rank and returns selected data specified by returnType.
Public methodStatic memberCode exampleGetByValue
Create expression that selects list items identified by value and returns selected data specified by returnType.
Public methodStatic memberGetByValueList
Create expression that selects list items identified by values and returns selected data specified by returnType.
Public methodStatic memberCode exampleGetByValueRange
Create expression that selects list items identified by value range and returns selected data specified by returnType.
Public methodStatic memberGetByValueRelativeRankRange(ListReturnType, Exp, Exp, Exp, CTX)
Create expression that selects list items nearest to value and greater by relative rank and returns selected data specified by returnType.

Examples for ordered list [0,4,5,9,11,15]:

  • (value,rank) = [selected items]
  • (5,0) = [5,9,11,15]
  • (5,1) = [9,11,15]
  • (5,-1) = [4,5,9,11,15]
  • (3,0) = [4,5,9,11,15]
  • (3,3) = [11,15]
  • (3,-3) = [0,4,5,9,11,15]

Public methodStatic memberGetByValueRelativeRankRange(ListReturnType, Exp, Exp, Exp, Exp, CTX)
Create expression that selects list items nearest to value and greater by relative rank with a count limit and returns selected data specified by returnType.

Examples for ordered list [0,4,5,9,11,15]:

  • (value,rank,count) = [selected items]
  • (5,0,2) = [5,9]
  • (5,1,1) = [9]
  • (5,-1,2) = [4,5]
  • (3,0,1) = [4]
  • (3,3,7) = [11,15]
  • (3,-3,2) = []

Public methodStatic memberIncrement
Create expression that increments list[index] by value. Value expression should resolve to a number.
Public methodStatic memberInsert
Create expression that inserts value to specified index of list.
Public methodStatic memberInsertItems
Create expression that inserts each input list item starting at specified index of list.
Public methodStatic memberRemoveByIndex
Create expression that removes list item identified by index.
Public methodStatic memberRemoveByIndexRange(Exp, Exp, CTX)
Create expression that removes list items starting at specified index to the end of list.
Public methodStatic memberRemoveByIndexRange(Exp, Exp, Exp, CTX)
Create expression that removes "count" list items starting at specified index.
Public methodStatic memberRemoveByRank
Create expression that removes list item identified by rank.
Public methodStatic memberRemoveByRankRange(Exp, Exp, CTX)
Create expression that removes list items starting at specified rank to the last ranked item.
Public methodStatic memberRemoveByRankRange(Exp, Exp, Exp, CTX)
Create expression that removes "count" list items starting at specified rank.
Public methodStatic memberRemoveByValue
Create expression that removes list items identified by value.
Public methodStatic memberRemoveByValueList
Create expression that removes list items identified by values.
Public methodStatic memberRemoveByValueRange
Create expression that removes list items identified by value range (valueBegin inclusive, valueEnd exclusive). If valueBegin is null, the range is less than valueEnd. If valueEnd is null, the range is greater than equal to valueBegin.
Public methodStatic memberRemoveByValueRelativeRankRange(Exp, Exp, Exp, CTX)
Create expression that removes list items nearest to value and greater by relative rank.

Examples for ordered list [0,4,5,9,11,15]:

  • (value,rank) = [removed items]
  • (5,0) = [5,9,11,15]
  • (5,1) = [9,11,15]
  • (5,-1) = [4,5,9,11,15]
  • (3,0) = [4,5,9,11,15]
  • (3,3) = [11,15]
  • (3,-3) = [0,4,5,9,11,15]

Public methodStatic memberRemoveByValueRelativeRankRange(Exp, Exp, Exp, Exp, CTX)
Create expression that removes list items nearest to value and greater by relative rank with a count limit.

Examples for ordered list [0,4,5,9,11,15]:

  • (value,rank,count) = [removed items]
  • (5,0,2) = [5,9]
  • (5,1,1) = [9]
  • (5,-1,2) = [4,5]
  • (3,0,1) = [4]
  • (3,3,7) = [11,15]
  • (3,-3,2) = []

Public methodStatic memberSet
Create expression that sets item value at specified index in list.
Public methodStatic memberCode exampleSize
Create expression that returns list size.
Public methodStatic memberSort
Create expression that sorts list according to sortFlags.
Top
See Also

Reference