Пример #1
0
 protected internal static Operation CreateOperation(int command, Operation.Type type, string binName, IList list, MapReturnType returnType)
 {
     Packer packer = new Packer();
     packer.PackRawShort(command);
     packer.PackArrayBegin(2);
     packer.PackNumber((int)returnType);
     packer.PackList(list);
     return new Operation(type, binName, Value.Get(packer.ToByteArray()));
 }
Пример #2
0
 /// <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)
 {
     return(MapBase.CreateOperation(MapBase.REMOVE_BY_KEY_LIST, Operation.Type.MAP_MODIFY, binName, keys, returnType));
 }
Пример #3
0
 /// <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)
 {
     byte[] bytes = PackUtil.Pack(MapOperation.GET_BY_RANK_RANGE, (int)returnType, rank, count, ctx);
     return(new Operation(Operation.Type.MAP_READ, binName, Value.Get(bytes)));
 }
Пример #4
0
 /// <summary>
 /// Create map get by key range operation.
 /// Server 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>
 /// Server returns selected data specified by returnType.
 /// </para>
 /// </summary>
 public static Operation GetByKeyRange(string binName, Value keyBegin, Value keyEnd, MapReturnType returnType, params CTX[] ctx)
 {
     return(CDT.CreateRangeOperation(GET_BY_KEY_INTERVAL, Operation.Type.MAP_READ, binName, ctx, keyBegin, keyEnd, (int)returnType));
 }
Пример #5
0
        protected internal static Operation CreateRangeOperation(int command, Operation.Type type, string binName, Value begin, Value end, MapReturnType returnType)
        {
            Packer packer = new Packer();
            packer.PackRawShort(command);

            if (begin == null)
            {
                begin = Value.AsNull;
            }

            if (end == null)
            {
                packer.PackArrayBegin(2);
                packer.PackNumber((int)returnType);
                begin.Pack(packer);
            }
            else
            {
                packer.PackArrayBegin(3);
                packer.PackNumber((int)returnType);
                begin.Pack(packer);
                end.Pack(packer);
            }
            return new Operation(type, binName, Value.Get(packer.ToByteArray()));
        }
 /// <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)
 {
     return MapBase.CreateOperation(MapBase.REMOVE_BY_VALUE, Operation.Type.MAP_MODIFY, binName, value, returnType);
 }
 /// <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)
 {
     return MapBase.CreateOperation(MapBase.REMOVE_BY_KEY, Operation.Type.MAP_MODIFY, binName, key, returnType);
 }
 /// <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)
 {
     return MapBase.CreateOperation(MapBase.GET_BY_VALUE, Operation.Type.MAP_READ, binName, value, returnType);
 }
Пример #9
0
 /// <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));
 }
Пример #10
0
 /// <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));
 }
Пример #11
0
 /// <summary>
 /// Create map get by value range operation.
 /// Server selects map 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.
 /// <para>
 /// Server returns selected data specified by returnType.
 /// </para>
 /// </summary>
 public static Operation GetByValueRange(string binName, Value valueBegin, Value valueEnd, MapReturnType returnType, params CTX[] ctx)
 {
     return(CDT.CreateRangeOperation(GET_BY_VALUE_INTERVAL, Operation.Type.MAP_READ, binName, ctx, valueBegin, valueEnd, (int)returnType));
 }
Пример #12
0
 /// <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));
 }
Пример #13
0
 /// <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));
 }
Пример #14
0
 /// <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));
 }
Пример #15
0
 /// <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)
 {
     return MapBase.CreateOperation(MapBase.GET_BY_KEY, Operation.Type.MAP_READ, binName, key, returnType);
 }
Пример #16
0
 /// <summary>
 /// Create map get by rank operation.
 /// Server selects map item identified by rank and returns selected data specified by returnType.
 /// </summary>
 public static Operation GetByRank(string binName, int rank, MapReturnType returnType)
 {
     return MapBase.CreateOperation(MapBase.GET_BY_RANK, Operation.Type.MAP_READ, binName, rank, returnType);
 }
Пример #17
0
 /// <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));
 }
Пример #18
0
 /// <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 MapBase.CreateOperation(MapBase.REMOVE_BY_INDEX, Operation.Type.MAP_MODIFY, binName, index, returnType);
 }
Пример #19
0
 /// <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));
 }
Пример #20
0
 /// <summary>
 /// Create map remove operation.
 /// Server 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. 
 /// <para>
 /// Server returns removed data specified by returnType. 
 /// </para>
 /// </summary>
 public static Operation RemoveByKeyRange(string binName, Value keyBegin, Value keyEnd, MapReturnType returnType)
 {
     return MapBase.CreateRangeOperation(MapBase.REMOVE_BY_KEY_INTERVAL, Operation.Type.MAP_MODIFY, binName, keyBegin, keyEnd, returnType);
 }
Пример #21
0
 /// <summary>
 /// Create expression that selects map item identified by key and returns selected data
 /// specified by returnType.
 /// </summary>
 /// <example>
 /// <code>
 /// // Map bin "a" contains key "B"
 /// Exp.GT(
 ///   MapExp.GetByKey(MapReturnType.COUNT, Type.INT, Exp.Val("B"), Exp.MapBin("a")),
 ///   Exp.Val(0));
 /// </code>
 /// </example>
 /// <param name="returnType">metadata attributes to return. See <see cref="MapReturnType"/> </param>
 /// <param name="valueType">		expected type of return value </param>
 /// <param name="key">			map key expression </param>
 /// <param name="bin">			bin or map value expression </param>
 /// <param name="ctx">			optional context path for nested CDT </param>
 public static Exp GetByKey(MapReturnType returnType, Exp.Type valueType, Exp key, Exp bin, params CTX[] ctx)
 {
     byte[] bytes = PackUtil.Pack(MapOperation.GET_BY_KEY, (int)returnType, key, ctx);
     return(AddRead(bin, bytes, valueType));
 }
Пример #22
0
 /// <summary>
 /// Create map remove operation.
 /// Server removes map 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. 
 /// <para>
 /// Server returns removed data specified by returnType. 
 /// </para>
 /// </summary>
 public static Operation RemoveByValueRange(string binName, Value valueBegin, Value valueEnd, MapReturnType returnType)
 {
     return MapBase.CreateRangeOperation(MapBase.REMOVE_BY_VALUE_INTERVAL, Operation.Type.MAP_MODIFY, binName, valueBegin, valueEnd, returnType);
 }
Пример #23
0
 /// <summary>
 /// Create expression that selects map items nearest to key and greater by index.
 /// Expression 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 Exp GetByKeyRelativeIndexRange(MapReturnType returnType, Exp key, Exp index, Exp bin, params CTX[] ctx)
 {
     byte[] bytes = PackUtil.Pack(MapOperation.GET_BY_KEY_REL_INDEX_RANGE, (int)returnType, key, index, ctx);
     return(AddRead(bin, bytes, GetValueType(returnType)));
 }
Пример #24
0
 public LineDriveMapOptions() {
     this.returnTypeField = MapReturnType.ReturnImage;
     this.fontSizeField = MapFontSize.Smaller;
 }
Пример #25
0
 /// <summary>
 /// Create expression that selects map 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.
 /// <para>
 /// Expression returns selected data specified by returnType.
 /// </para>
 /// </summary>
 public static Exp GetByValueRange(MapReturnType returnType, Exp valueBegin, Exp valueEnd, Exp bin, params CTX[] ctx)
 {
     byte[] bytes = ListExp.PackRangeOperation(MapOperation.GET_BY_VALUE_INTERVAL, (int)returnType, valueBegin, valueEnd, ctx);
     return(AddRead(bin, bytes, GetValueType(returnType)));
 }
Пример #26
0
 /// <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, params CTX[] ctx)
 {
     byte[] bytes = PackUtil.Pack(MapOperation.GET_BY_INDEX_RANGE, (int)returnType, index, ctx);
     return(new Operation(Operation.Type.MAP_READ, binName, Value.Get(bytes)));
 }
Пример #27
0
 /// <summary>
 /// Create expression that selects map items identified by values and returns selected data specified by
 /// returnType.
 /// </summary>
 public static Exp GetByValueList(MapReturnType returnType, Exp values, Exp bin, params CTX[] ctx)
 {
     byte[] bytes = PackUtil.Pack(MapOperation.GET_BY_VALUE_LIST, (int)returnType, values, ctx);
     return(AddRead(bin, bytes, GetValueType(returnType)));
 }
Пример #28
0
 /// <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)
 {
     return(MapBase.CreateOperation(MapBase.REMOVE_BY_KEY, Operation.Type.MAP_MODIFY, binName, key, returnType));
 }
Пример #29
0
 /// <summary>
 /// Create expression that selects map item identified by index and returns selected data specified by
 /// returnType.
 /// </summary>
 public static Exp GetByIndex(MapReturnType returnType, Exp.Type valueType, Exp index, Exp bin, params CTX[] ctx)
 {
     byte[] bytes = PackUtil.Pack(MapOperation.GET_BY_INDEX, (int)returnType, index, ctx);
     return(AddRead(bin, bytes, valueType));
 }
Пример #30
0
 /// <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)
 {
     return MapBase.CreateOperation(MapBase.GET_BY_INDEX_RANGE, Operation.Type.MAP_READ, binName, index, count, returnType);
 }
Пример #31
0
 /// <summary>
 /// Create expression that selects "count" map items starting at specified index and returns selected data
 /// specified by returnType.
 /// </summary>
 public static Exp GetByIndexRange(MapReturnType returnType, Exp index, Exp count, Exp bin, params CTX[] ctx)
 {
     byte[] bytes = PackUtil.Pack(MapOperation.GET_BY_INDEX_RANGE, (int)returnType, index, count, ctx);
     return(AddRead(bin, bytes, GetValueType(returnType)));
 }
Пример #32
0
 /// <summary>
 /// Create map get by key range operation.
 /// Server 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>
 /// Server returns selected data specified by returnType. 
 /// </para>
 /// </summary>
 public static Operation GetByKeyRange(string binName, Value keyBegin, Value keyEnd, MapReturnType returnType)
 {
     return MapBase.CreateRangeOperation(MapBase.GET_BY_KEY_INTERVAL, Operation.Type.MAP_READ, binName, keyBegin, keyEnd, returnType);
 }
Пример #33
0
 /// <summary>
 /// Create expression that selects map item identified by rank and returns selected data specified by
 /// returnType.
 /// </summary>
 public static Exp GetByRank(MapReturnType returnType, Exp.Type valueType, Exp rank, Exp bin, params CTX[] ctx)
 {
     byte[] bytes = PackUtil.Pack(MapOperation.GET_BY_RANK, (int)returnType, rank, ctx);
     return(AddRead(bin, bytes, valueType));
 }
Пример #34
0
 /// <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)
 {
     return MapBase.CreateOperation(MapBase.GET_BY_RANK_RANGE, Operation.Type.MAP_READ, binName, rank, count, returnType);
 }
Пример #35
0
 /// <summary>
 /// Create expression that selects "count" map items starting at specified rank and returns selected
 /// data specified by returnType.
 /// </summary>
 public static Exp GetByRankRange(MapReturnType returnType, Exp rank, Exp count, Exp bin, params CTX[] ctx)
 {
     byte[] bytes = PackUtil.Pack(MapOperation.GET_BY_RANK_RANGE, (int)returnType, rank, count, ctx);
     return(AddRead(bin, bytes, GetValueType(returnType)));
 }
Пример #36
0
 /// <summary>
 /// Create map get by value range operation.
 /// Server selects map 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. 
 /// <para>
 /// Server returns selected data specified by returnType. 
 /// </para>
 /// </summary>
 public static Operation GetByValueRange(string binName, Value valueBegin, Value valueEnd, MapReturnType returnType)
 {
     return MapBase.CreateRangeOperation(MapBase.GET_BY_VALUE_INTERVAL, Operation.Type.MAP_READ, binName, valueBegin, valueEnd, returnType);
 }
Пример #37
0
 /// <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)
 {
     byte[] bytes = PackUtil.Pack(MapOperation.REMOVE_BY_KEY_LIST, (int)returnType, keys, ctx);
     return(new Operation(Operation.Type.MAP_MODIFY, binName, Value.Get(bytes)));
 }
Пример #38
0
 /// <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 MapBase.CreateOperation(MapBase.REMOVE_BY_INDEX_RANGE, Operation.Type.MAP_MODIFY, binName, index, count, returnType);
 }
Пример #39
0
 /// <summary>
 /// Create map remove operation.
 /// Server 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.
 /// <para>
 /// Server returns removed data specified by returnType.
 /// </para>
 /// </summary>
 public static Operation RemoveByKeyRange(string binName, Value keyBegin, Value keyEnd, MapReturnType returnType, params CTX[] ctx)
 {
     byte[] bytes = CDT.PackRangeOperation(MapOperation.REMOVE_BY_KEY_INTERVAL, (int)returnType, keyBegin, keyEnd, ctx);
     return(new Operation(Operation.Type.MAP_MODIFY, binName, Value.Get(bytes)));
 }
Пример #40
0
 /// <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)
 {
     return MapBase.CreateOperation(MapBase.REMOVE_BY_KEY_LIST, Operation.Type.MAP_MODIFY, binName, keys, returnType);
 }
Пример #41
0
 /// <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)
 {
     byte[] bytes = PackUtil.Pack(MapOperation.REMOVE_BY_VALUE, (int)returnType, value, ctx);
     return(new Operation(Operation.Type.MAP_MODIFY, binName, Value.Get(bytes)));
 }
Пример #42
0
 /// <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)
 {
     return MapBase.CreateOperation(MapBase.REMOVE_BY_RANK_RANGE, Operation.Type.MAP_MODIFY, binName, rank, count, returnType);
 }
Пример #43
0
 /// <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, params CTX[] ctx)
 {
     byte[] bytes = PackUtil.Pack(MapOperation.REMOVE_BY_INDEX_RANGE, (int)returnType, index, count, ctx);
     return(new Operation(Operation.Type.MAP_MODIFY, binName, Value.Get(bytes)));
 }
Пример #44
0
 /// <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)
 {
     return MapBase.CreateOperation(MapBase.REMOVE_BY_VALUE_LIST, Operation.Type.MAP_MODIFY, binName, values, returnType);
 }
Пример #45
0
 /// <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, params CTX[] ctx)
 {
     byte[] bytes = PackUtil.Pack(MapOperation.REMOVE_BY_RANK_RANGE, (int)returnType, rank, ctx);
     return(new Operation(Operation.Type.MAP_MODIFY, binName, Value.Get(bytes)));
 }
Пример #46
0
 /// <summary>
 /// Create map get by index operation.
 /// Server selects map item identified by index and returns selected data specified by returnType. 
 /// </summary>
 public static Operation GetByIndex(string binName, int index, MapReturnType returnType)
 {
     return MapBase.CreateOperation(MapBase.GET_BY_INDEX, Operation.Type.MAP_READ, binName, index, returnType);
 }
Пример #47
0
 /// <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)
 {
     byte[] bytes = PackUtil.Pack(MapOperation.GET_BY_KEY, (int)returnType, key, ctx);
     return(new Operation(Operation.Type.MAP_READ, binName, Value.Get(bytes)));
 }
Пример #48
0
 /// <summary>
 /// Create map get by value range operation.
 /// Server selects map 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.
 /// <para>
 /// Server returns selected data specified by returnType.
 /// </para>
 /// </summary>
 public static Operation GetByValueRange(string binName, Value valueBegin, Value valueEnd, MapReturnType returnType, params CTX[] ctx)
 {
     byte[] bytes = CDT.PackRangeOperation(MapOperation.GET_BY_VALUE_INTERVAL, (int)returnType, valueBegin, valueEnd, ctx);
     return(new Operation(Operation.Type.MAP_READ, binName, Value.Get(bytes)));
 }
Пример #49
0
 /// <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)
 {
     byte[] bytes = PackUtil.Pack(MapOperation.GET_BY_VALUE_LIST, (int)returnType, values, ctx);
     return(new Operation(Operation.Type.MAP_READ, binName, Value.Get(bytes)));
 }
Пример #50
0
 public MapOptions() {
     this.fontSizeField = MapFontSize.Smaller;
     this.isOverviewMapField = false;
     this.returnTypeField = MapReturnType.ReturnImage;
     this.zoomField = 1;
     this.preventIconCollisionsField = false;
 }
Пример #51
0
 /// <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));
 }