Skip to main content
Loading

List Bin Operations

List expressions is a system for calling CDT List operations. These expressions return bins that can be used in other expressions that take a bin parameter.

List Modify Operations

List-modify expressions differ from CDT List operations in that they return the modified list-bin instead of a specified return type (for remove-by ops) or predefined return type (The CDT operation append returns an int for example).

list_append

Introduced: 5.2.0.4

list_append(context, policy, value, bin)

Append value to list bin. list_append does not create a new bin if the specified bin does not exist, unlike the append CDT List operation, which does create a new bin if the specified bin does not exist.

Arguments:
  • context (library_specific)
  • policy (library_specific)
  • value (expr)
  • bin (list_bin_expr)

Returns: (list_bin)

list_append_items

Introduced: 5.2.0.4

list_append_items(context, policy, values, bin)

Append all elements in values to list bin.

Arguments:
  • context (library_specific)
  • policy (library_specific)
  • values (list_expr)
  • bin (list_bin_expr)

Returns: (list_bin)

list_clear

Introduced: 5.2.0.4

list_clear(context, bin)

Clear all elements in list bin.

Arguments:
  • context (library_specific)
  • bin (list_bin_expr)

Returns: (list_bin)

list_increment

Introduced:

list_increment(context, policy, index, delta, bin)

Increment element at index by delta.

Arguments:
  • context (library_specific)
  • policy (library_specific)
  • index (integer_expr)
  • delta (integer_expr)
  • bin (list_bin_expr)

Returns: (list_bin)

list_insert

Introduced: 5.2.0.4

list_insert(context, policy, index, value, bin)

Insert value at index.

Arguments:
  • context (library_specific)
  • policy (library_specific)
  • index (integer_expr)
  • value (expr)
  • bin (list_bin_expr)

Returns: (list_bin)

list_insert_items

Introduced: 5.2.0.4

list_insert_items(context, policy, index, values, bin)

Insert all elements in values at index.

Arguments:
  • context (library_specific)
  • policy (library_specific)
  • index (integer_expr)
  • values (list_expr)
  • bin (list_bin_expr)

Returns: (list_bin)

list_remove_by_index

Introduced: 5.2.0.4

list_remove_by_index(context, index, bin)

Remove element at index.

Arguments:
  • context (library_specific)
  • index (integer_expr)
  • bin (list_bin_expr)

Returns: (list_bin)

list_remove_by_index_range

Introduced: 5.2.0.4

list_remove_by_index_range(context, index, count, bin)

Remove count element at index.

Arguments:
  • context (library_specific)
  • index (integer_expr)
  • count (integer_expr)
  • bin (list_bin_expr)

Returns: (list_bin)

list_remove_by_index_range_to_end

Introduced: 5.2.0.4

list_remove_by_index_range_to_end(context, index, bin)

Remove all elements at and after index.

Arguments:
  • context (library_specific)
  • index (integer_expr)
  • bin (list_bin_expr)

Returns: (list_bin)

list_remove_by_rank

Introduced: 5.2.0.4

list_remove_by_rank(context, rank, bin)

Remove all element with rank rank.

Arguments:
  • context (library_specific)
  • rank (integer_expr)
  • bin (list_bin_expr)

Returns: (list_bin)

list_remove_by_rank_range

Introduced: 5.2.0.4

list_remove_by_rank_range(context, rank, count, bin)

Remove count element at rank.

Arguments:
  • context (library_specific)
  • rank (integer_expr)
  • count (integer_expr)
  • bin (list_bin_expr)

Returns: (list_bin)

list_remove_by_rank_range_to_end

Introduced: 5.2.0.4

list_remove_by_rank_range_to_end(context, rank, bin)

Remove all elements at and after rank.

Arguments:
  • context (library_specific)
  • rank (integer_expr)
  • bin (list_bin_expr)

Returns: (list_bin)

list_remove_by_rel_rank_range

Introduced: 5.2.0.4

list_remove_by_rel_rank_range(context, value, rank, count, bin)

Remove count element at rank relative to value.

Arguments:
  • context (library_specific)
  • value (expr)
  • rank (integer_expr)
  • count (integer_expr)
  • bin (list_bin_expr)

Returns: (list_bin)

list_remove_by_rel_rank_range_to_end

Introduced: 5.2.0.4

list_remove_by_rel_rank_range_to_end(context, value, rank, bin)

Remove all elements at and after rank relative to value.

Arguments:
  • context (library_specific)
  • value (expr)
  • rank (integer_expr)
  • bin (list_bin_expr)

Returns: (list_bin)

list_remove_by_value

Introduced: 5.2.0.4

list_remove_by_value(context, value, bin)

Remove all value values from list.

Arguments:
  • context (library_specific)
  • value (expr)
  • bin (list_bin_expr)

Returns: (list_bin)

list_remove_by_value_list

Introduced: 5.2.0.4

list_remove_by_value_list(context, value, bin)

Remove all elements with values in value_list from list.

Arguments:
  • context (library_specific)
  • value (list_expr)
  • bin (list_bin_expr)

Returns: (list_bin)

list_remove_by_value_range

Introduced: 5.2.0.4

list_remove_by_value_range(context, start, end, bin)

Remove all elements x in interval start โ‰ค x < end from list.

Arguments:
  • context (library_specific)
  • start (expr)
  • end (expr)
  • bin (list_bin_expr)

Returns: (list_bin)

list_set

Introduced: 5.2.0.4

list_set(context, index, value, bin)

Set element at index to value.

Arguments:
  • context (library_specific)
  • index (integer-expr)
  • value (expr)
  • bin (list_bin_expr)

Returns: (list_bin)

list_sort

Introduced: 5.2.0.4

list_sort(context, flag, bin)

Sort list.

Arguments:
  • context (library_specific)
  • flag (integer)
  • bin (list_bin_expr)

Returns: (list_bin)

List Read Operations

List_read expressions (other than LIST_SIZE) return a result based on their integer_value parameter. Calling single result CDT operations (e.g. LIST_GET_BY_INDEX) requires an integer_value when integer_value is LIST_RETURN_VALUE because a list element value can be any expression type.

list_get_by_index

Introduced: 5.2.0.4

list_get_by_index(type, context, result_type, index, bin)

Get element at index.

Arguments:
  • type (integer_value)
  • context (library_specific)
  • result_type (integer_value)
  • index (integer_expr)
  • bin (list_bin_expr)

list_get_by_index_range

Introduced: 5.2.0.4

list_get_by_index_range(context, result_type, index, count, bin)

Get count elements at index.

Arguments:
  • context (library_specific)
  • result_type (integer_value)
  • index (integer_expr)
  • count (integer_expr)
  • bin (list_bin_expr)

list_get_by_index_range_to_end

Introduced: 5.2.0.4

list_get_by_index_range_to_end(context, result_type, index, bin)

Get elements at and after index.

Arguments:
  • context (library_specific)
  • result_type (integer_value)
  • index (integer_expr)
  • bin (list_bin_expr)

list_get_by_rank

Introduced: 5.2.0.4

list_get_by_rank(type, context, result_type, rank, bin)

Get element at rank.

Arguments:
  • type (integer_value)
  • context (library_specific)
  • result_type (integer_value)
  • rank (integer_expr)
  • bin (list_bin_expr)

list_get_by_rank_range

Introduced:

list_get_by_rank_range(context, result_type, rank, count, bin)

Get count elements at rank.

Arguments:
  • context (library_specific)
  • result_type (integer_value)
  • rank (integer_expr)
  • count (integer_expr)
  • bin (list_bin_expr)

list_get_by_rank_range_to_end

Introduced: 5.2.0.4

list_get_by_rank_range_to_end(context, result_type, rank, bin)

Get elements at and after rank.

Arguments:
  • context (library_specific)
  • result_type (integer_value)
  • rank (integer_expr)
  • bin (list_bin_expr)

list_get_by_rel_rank_range

Introduced: 5.2.0.4

list_get_by_rel_rank_range(context, result_type, value, rank, count, bin)

Get count element at rank relative to value.

Arguments:
  • context (library_specific)
  • result_type (integer_value)
  • value (expr)
  • rank (integer_expr)
  • count (integer_expr)
  • bin (list_bin_expr)

list_get_by_rel_rank_range_to_end

Introduced: 5.2.0.4

list_get_by_rel_rank_range_to_end(context, result_type, value, rank, bin)

Get all elements at and after rank relative to value.

Arguments:
  • context (library_specific)
  • result_type (integer_value)
  • value (expr)
  • rank (integer_expr)
  • bin (list_bin_expr)

list_get_by_value

Introduced: 5.2.0.4

list_get_by_value(context, result_type, value, bin)

Get all value values from list.

Arguments:
  • context (library_specific)
  • result_type (integer_value)
  • value (expr)
  • bin (list_bin_expr)

list_get_by_value_list

Introduced: 5.2.0.4

list_get_by_value_list(context, result_type, values, bin)

Get all elements with values in values from list.

Arguments:
  • context (library_specific)
  • result_type (integer_value)
  • values (list_expr)
  • bin (list_bin_expr)

list_get_by_value_range

Introduced: 5.2.0.4

list_get_by_value_range(context, result_type, start, end, bin)

Get all elements x in interval start โ‰ค x < end from list.

Arguments:
  • context (library_specific)
  • result_type (integer_value)
  • start (expr)
  • end (expr)
  • bin (list_bin_expr)

list_size

Introduced: 5.2.0.4

list_size(context, bin)

Get list element count.

Arguments:
  • context (library_specific)
  • bin (list_bin_expr)

Returns: (integer_bin)