Example #1
0
 /// <summary>
 /// Create list get by rank operation.
 /// Server selects list item identified by rank and returns selected data specified by returnType.
 /// </summary>
 public static Operation GetByRank(string binName, int rank, ListReturnType returnType, params CTX[] ctx)
 {
     return(CDT.CreateOperation(GET_BY_RANK, Operation.Type.CDT_READ, binName, ctx, (int)returnType, rank));
 }
 /// <summary>
 /// Create map get by value list operation.
 /// Server selects map items identified by values and returns selected data specified by returnType.
 /// </summary>
 public static Operation GetByValueList(string binName, IList values, MapReturnType returnType, params CTX[] ctx)
 {
     return(CDT.CreateOperation(GET_BY_VALUE_LIST, Operation.Type.MAP_READ, binName, ctx, (int)returnType, values));
 }
 /// <summary>
 /// Create map get by index range operation.
 /// Server selects "count" map items starting at specified index and returns selected data specified by returnType.
 /// </summary>
 public static Operation GetByIndexRange(string binName, int index, int count, MapReturnType returnType, params CTX[] ctx)
 {
     return(CDT.CreateOperation(GET_BY_INDEX_RANGE, Operation.Type.MAP_READ, binName, ctx, (int)returnType, index, count));
 }
 /// <summary>
 /// Create map get by key operation.
 /// Server selects map item identified by key and returns selected data specified by returnType.
 /// </summary>
 public static Operation GetByKey(string binName, Value key, MapReturnType returnType, params CTX[] ctx)
 {
     return(CDT.CreateOperation(GET_BY_KEY, Operation.Type.MAP_READ, binName, ctx, (int)returnType, key));
 }
 /// <summary>
 /// Create map get by key relative to index range operation.
 /// Server selects map items nearest to key and greater by index.
 /// Server returns selected data specified by returnType.
 /// <para>
 /// Examples for ordered map [{0=17},{4=2},{5=15},{9=10}]:
 /// <ul>
 /// <li>(value,index) = [selected items]</li>
 /// <li>(5,0) = [{5=15},{9=10}]</li>
 /// <li>(5,1) = [{9=10}]</li>
 /// <li>(5,-1) = [{4=2},{5=15},{9=10}]</li>
 /// <li>(3,2) = [{9=10}]</li>
 /// <li>(3,-2) = [{0=17},{4=2},{5=15},{9=10}]</li>
 /// </ul>
 /// </para>
 /// </summary>
 public static Operation GetByKeyRelativeIndexRange(string binName, Value key, int index, MapReturnType returnType, params CTX[] ctx)
 {
     return(CDT.CreateOperation(GET_BY_KEY_REL_INDEX_RANGE, Operation.Type.MAP_READ, binName, ctx, (int)returnType, key, index));
 }
 /// <summary>
 /// Create map remove operation.
 /// Server removes map items identified by values and returns removed data specified by returnType.
 /// </summary>
 public static Operation RemoveByValueList(string binName, IList values, MapReturnType returnType, params CTX[] ctx)
 {
     return(CDT.CreateOperation(REMOVE_BY_VALUE_LIST, Operation.Type.MAP_MODIFY, binName, ctx, (int)returnType, values));
 }
 /// <summary>
 /// Create map remove operation.
 /// Server removes "count" map items starting at specified rank and returns removed data specified by returnType.
 /// </summary>
 public static Operation RemoveByRankRange(string binName, int rank, int count, MapReturnType returnType, params CTX[] ctx)
 {
     return(CDT.CreateOperation(REMOVE_BY_RANK_RANGE, Operation.Type.MAP_MODIFY, binName, ctx, (int)returnType, rank, count));
 }
 /// <summary>
 /// Create map remove operation.
 /// Server removes map items starting at specified rank to the last ranked item and returns removed
 /// data specified by returnType.
 /// </summary>
 public static Operation RemoveByRankRange(string binName, int rank, MapReturnType returnType)
 {
     return(CDT.CreateOperation(REMOVE_BY_RANK_RANGE, Operation.Type.MAP_MODIFY, binName, (int)returnType, rank));
 }
 /// <summary>
 /// Create map size operation.
 /// Server returns size of map.
 /// </summary>
 public static Operation Size(string binName)
 {
     return(CDT.CreateOperation(SIZE, Operation.Type.MAP_READ, binName));
 }
 /// <summary>
 /// Create map remove operation.
 /// Server removes map item identified by index and returns removed data specified by returnType.
 /// </summary>
 public static Operation RemoveByIndex(string binName, int index, MapReturnType returnType)
 {
     return(CDT.CreateOperation(REMOVE_BY_INDEX, Operation.Type.MAP_MODIFY, binName, (int)returnType, index));
 }
 /// <summary>
 /// Create map remove operation.
 /// Server removes "count" map items starting at specified index and returns removed data specified by returnType.
 /// </summary>
 public static Operation RemoveByIndexRange(string binName, int index, int count, MapReturnType returnType)
 {
     return(CDT.CreateOperation(REMOVE_BY_INDEX_RANGE, Operation.Type.MAP_MODIFY, binName, (int)returnType, index, count));
 }
 /// <summary>
 /// Create map clear operation.
 /// Server removes all items in map.  Server returns null.
 /// </summary>
 public static Operation Clear(string binName)
 {
     return(CDT.CreateOperation(CLEAR, Operation.Type.MAP_MODIFY, binName));
 }
 /// <summary>
 /// Create map increment operation.
 /// Server increments values by incr for all items identified by key and returns final result.
 /// Valid only for numbers.
 /// <para>
 /// The required map policy dictates the type of map to create when it does not exist.
 /// The map policy also specifies the mode used when writing items to the map.
 /// See policy <seealso cref="Aerospike.Client.MapPolicy"/> and write mode
 /// <seealso cref="Aerospike.Client.MapWriteMode"/>.
 /// </para>
 /// </summary>
 public static Operation Increment(MapPolicy policy, string binName, Value key, Value incr)
 {
     return(CDT.CreateOperation(INCREMENT, Operation.Type.MAP_MODIFY, binName, key, incr, policy.attributes));
 }
Example #14
0
 /// <summary>
 /// Create map remove by value relative to rank range operation.
 /// Server removes map items nearest to value and greater by relative rank with a count limit.
 /// Server returns removed data specified by returnType.
 /// <para>
 /// Examples for map [{4=2},{9=10},{5=15},{0=17}]:
 /// <ul>
 /// <li>(value,rank,count) = [removed items]</li>
 /// <li>(11,1,1) = [{0=17}]</li>
 /// <li>(11,-1,1) = [{9=10}]</li>
 /// </ul>
 /// </para>
 /// </summary>
 public static Operation RemoveByValueRelativeRankRange(string binName, Value value, int rank, int count, MapReturnType returnType)
 {
     return(CDT.CreateOperation(REMOVE_BY_VALUE_REL_RANK_RANGE, Operation.Type.MAP_MODIFY, binName, (int)returnType, value, rank, count));
 }
 /// <summary>
 /// Create map remove by key relative to index range operation.
 /// Server removes map items nearest to key and greater by index with a count limit.
 /// Server returns removed data specified by returnType.
 /// <para>
 /// Examples for map [{0=17},{4=2},{5=15},{9=10}]:
 /// <ul>
 /// <li>(value,index,count) = [removed items]</li>
 /// <li>(5,0,1) = [{5=15}]</li>
 /// <li>(5,1,2) = [{9=10}]</li>
 /// <li>(5,-1,1) = [{4=2}]</li>
 /// <li>(3,2,1) = [{9=10}]</li>
 /// <li>(3,-2,2) = [{0=17}]</li>
 /// </ul>
 /// </para>
 /// </summary>
 public static Operation RemoveByKeyRelativeIndexRange(string binName, Value key, int index, int count, MapReturnType returnType, params CTX[] ctx)
 {
     return(CDT.CreateOperation(REMOVE_BY_KEY_REL_INDEX_RANGE, Operation.Type.MAP_MODIFY, binName, ctx, (int)returnType, key, index, count));
 }
 /// <summary>
 /// Create map get by index range operation.
 /// Server selects map items starting at specified index to the end of map and returns selected
 /// data specified by returnType.
 /// </summary>
 public static Operation GetByIndexRange(string binName, int index, MapReturnType returnType)
 {
     return(CDT.CreateOperation(GET_BY_INDEX_RANGE, Operation.Type.MAP_READ, binName, (int)returnType, index));
 }
 /// <summary>
 /// Create map remove operation.
 /// Server removes map items identified by value and returns removed data specified by returnType.
 /// </summary>
 public static Operation RemoveByValue(string binName, Value value, MapReturnType returnType, params CTX[] ctx)
 {
     return(CDT.CreateOperation(REMOVE_BY_VALUE, Operation.Type.MAP_MODIFY, binName, ctx, (int)returnType, value));
 }
 /// <summary>
 /// Create map get by rank range operation.
 /// Server selects map items starting at specified rank to the last ranked item and returns selected
 /// data specified by returnType.
 /// </summary>
 public static Operation GetByRankRange(string binName, int rank, MapReturnType returnType)
 {
     return(CDT.CreateOperation(GET_BY_RANK_RANGE, Operation.Type.MAP_READ, binName, (int)returnType, rank));
 }
 /// <summary>
 /// Create map remove operation.
 /// Server removes map items starting at specified index to the end of map and returns removed
 /// data specified by returnType.
 /// </summary>
 public static Operation RemoveByIndexRange(string binName, int index, MapReturnType returnType, params CTX[] ctx)
 {
     return(CDT.CreateOperation(REMOVE_BY_INDEX_RANGE, Operation.Type.MAP_MODIFY, binName, ctx, (int)returnType, index));
 }
 /// <summary>
 /// Create set map policy operation.
 /// Server sets map policy attributes.  Server returns null.
 /// <para>
 /// The required map policy attributes can be changed after the map is created.
 /// </para>
 /// </summary>
 public static Operation SetMapPolicy(MapPolicy policy, string binName, params CTX[] ctx)
 {
     return(CDT.CreateOperation(SET_TYPE, Operation.Type.MAP_MODIFY, binName, ctx, policy.attributes));
 }
 /// <summary>
 /// Create map size operation.
 /// Server returns size of map.
 /// </summary>
 public static Operation Size(string binName, params CTX[] ctx)
 {
     return(CDT.CreateOperation(SIZE, Operation.Type.MAP_READ, binName, ctx));
 }
 /// <summary>
 /// Create map decrement operation.
 /// Server decrements values by decr for all items identified by key and returns final result.
 /// Valid only for numbers.
 /// <para>
 /// The required map policy dictates the type of map to create when it does not exist.
 /// The map policy also specifies the mode used when writing items to the map.
 /// See policy <seealso cref="Aerospike.Client.MapPolicy"/> and write mode
 /// <seealso cref="Aerospike.Client.MapWriteMode"/>.
 /// </para>
 /// </summary>
 public static Operation Decrement(MapPolicy policy, string binName, Value key, Value decr, params CTX[] ctx)
 {
     return(CDT.CreateOperation(DECREMENT, Operation.Type.MAP_MODIFY, binName, ctx, key, decr, policy.attributes));
 }
 /// <summary>
 /// Create map get by key list operation.
 /// Server selects map items identified by keys and returns selected data specified by returnType.
 /// </summary>
 public static Operation GetByKeyList(string binName, IList keys, MapReturnType returnType, params CTX[] ctx)
 {
     return(CDT.CreateOperation(GET_BY_KEY_LIST, Operation.Type.MAP_READ, binName, ctx, (int)returnType, keys));
 }
 /// <summary>
 /// Create map clear operation.
 /// Server removes all items in map.  Server returns null.
 /// </summary>
 public static Operation Clear(string binName, params CTX[] ctx)
 {
     return(CDT.CreateOperation(CLEAR, Operation.Type.MAP_MODIFY, binName, ctx));
 }
 /// <summary>
 /// Create map get by value operation.
 /// Server selects map items identified by value and returns selected data specified by returnType.
 /// </summary>
 public static Operation GetByValue(string binName, Value value, MapReturnType returnType, params CTX[] ctx)
 {
     return(CDT.CreateOperation(GET_BY_VALUE, Operation.Type.MAP_READ, binName, ctx, (int)returnType, value));
 }
 /// <summary>
 /// Create map remove operation.
 /// Server removes map item identified by key and returns removed data specified by returnType.
 /// </summary>
 public static Operation RemoveByKey(string binName, Value key, MapReturnType returnType, params CTX[] ctx)
 {
     return(CDT.CreateOperation(REMOVE_BY_KEY, Operation.Type.MAP_MODIFY, binName, ctx, (int)returnType, key));
 }
 /// <summary>
 /// Create map get by value relative to rank range operation.
 /// Server selects map items nearest to value and greater by relative rank.
 /// Server returns selected data specified by returnType.
 /// <para>
 /// Examples for map [{4=2},{9=10},{5=15},{0=17}]:
 /// <ul>
 /// <li>(value,rank) = [selected items]</li>
 /// <li>(11,1) = [{0=17}]</li>
 /// <li>(11,-1) = [{9=10},{5=15},{0=17}]</li>
 /// </ul>
 /// </para>
 /// </summary>
 public static Operation GetByValueRelativeRankRange(string binName, Value value, int rank, MapReturnType returnType, params CTX[] ctx)
 {
     return(CDT.CreateOperation(GET_BY_VALUE_REL_RANK_RANGE, Operation.Type.MAP_READ, binName, ctx, (int)returnType, value, rank));
 }
 /// <summary>
 /// Create map remove operation.
 /// Server removes map items identified by keys and returns removed data specified by returnType.
 /// </summary>
 public static Operation RemoveByKeyList(string binName, IList keys, MapReturnType returnType, params CTX[] ctx)
 {
     return(CDT.CreateOperation(REMOVE_BY_KEY_LIST, Operation.Type.MAP_MODIFY, binName, ctx, (int)returnType, keys));
 }
 /// <summary>
 /// Create map get by rank range operation.
 /// Server selects "count" map items starting at specified rank and returns selected data specified by returnType.
 /// </summary>
 public static Operation GetByRankRange(string binName, int rank, int count, MapReturnType returnType, params CTX[] ctx)
 {
     return(CDT.CreateOperation(GET_BY_RANK_RANGE, Operation.Type.MAP_READ, binName, ctx, (int)returnType, rank, count));
 }
Example #30
0
 /// <summary>
 /// Create list get by index operation.
 /// Server selects list item identified by index and returns selected data specified by returnType
 ///.
 /// </summary>
 public static Operation GetByIndex(string binName, int index, ListReturnType returnType, params CTX[] ctx)
 {
     return(CDT.CreateOperation(GET_BY_INDEX, Operation.Type.CDT_READ, binName, ctx, (int)returnType, index));
 }