예제 #1
0
 /// <summary>
 /// Create expression that selects list items identified by value range and returns selected data
 /// specified by returnType.
 /// </summary>
 /// <example>
 /// <code>
 /// // List bin "a" items >= 10 &amp;&amp; items &lt; 20
 /// ListExp.GetByValueRange(ListReturnType.VALUE, Exp.Val(10), Exp.Val(20), Exp.ListBin("a"))
 /// </code>
 /// </example>
 /// <param name="returnType">metadata attributes to return. See <see cref="ListReturnType"/></param>
 /// <param name="valueBegin">begin expression inclusive. If null, range is less than valueEnd.</param>
 /// <param name="valueEnd">end expression exclusive. If null, range is greater than equal to valueBegin.</param>
 /// <param name="bin">bin or list value expression</param>
 /// <param name="ctx">optional context path for nested CDT</param>
 public static Exp GetByValueRange(ListReturnType returnType, Exp valueBegin, Exp valueEnd, Exp bin, params CTX[] ctx)
 {
     byte[] bytes = ListExp.PackRangeOperation(ListOperation.GET_BY_VALUE_INTERVAL, (int)returnType, valueBegin, valueEnd, ctx);
     return(AddRead(bin, bytes, GetValueType(returnType)));
 }
예제 #2
0
 /// <summary>
 /// Create expression that selects map items identified by key range (keyBegin inclusive, keyEnd exclusive).
 /// If keyBegin is null, the range is less than keyEnd.
 /// If keyEnd is null, the range is greater than equal to keyBegin.
 /// <para>
 /// Expression returns selected data specified by returnType.
 /// </para>
 /// </summary>
 public static Exp GetByKeyRange(MapReturnType returnType, Exp keyBegin, Exp keyEnd, Exp bin, params CTX[] ctx)
 {
     byte[] bytes = ListExp.PackRangeOperation(MapOperation.GET_BY_KEY_INTERVAL, (int)returnType, keyBegin, keyEnd, ctx);
     return(AddRead(bin, bytes, GetValueType(returnType)));
 }
예제 #3
0
 /// <summary>
 /// 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.
 /// </summary>
 public static Exp RemoveByValueRange(Exp valueBegin, Exp valueEnd, Exp bin, params CTX[] ctx)
 {
     byte[] bytes = ListExp.PackRangeOperation(ListOperation.REMOVE_BY_VALUE_INTERVAL, (int)ListReturnType.NONE, valueBegin, valueEnd, ctx);
     return(AddWrite(bin, bytes, ctx));
 }
예제 #4
0
 /// <summary>
 /// Create expression that removes map items identified by key range (keyBegin inclusive, keyEnd exclusive).
 /// If keyBegin is null, the range is less than keyEnd.
 /// If keyEnd is null, the range is greater than equal to keyBegin.
 /// </summary>
 public static Exp RemoveByKeyRange(Exp keyBegin, Exp keyEnd, Exp bin, params CTX[] ctx)
 {
     byte[] bytes = ListExp.PackRangeOperation(MapOperation.REMOVE_BY_KEY_INTERVAL, (int)MapReturnType.NONE, keyBegin, keyEnd, ctx);
     return(AddWrite(bin, bytes, ctx));
 }