Exemplo n.º 1
0
        internal ByteRangeParams ToByteRangeParams()
        {
            ByteRangeParams ps = new ByteRangeParams();

            ps.prefix           = Client.StringToByteArray(prefix);
            ps.startKey         = Client.StringToByteArray(startKey);
            ps.endKey           = Client.StringToByteArray(endKey);
            ps.count            = count;
            ps.forwardDirection = forwardDirection;

            return(ps);
        }
Exemplo n.º 2
0
        public void ListTestLinq()
        {
            Client client = new Client(Utils.GetConfigNodes());
            Table  table  = client.GetDatabase("Benchmark").GetTable("transactionNetworkTransaction");

            byte[] prefix                 = Utils.StringToByteArray("N:0000000000000|T:000000");
            byte[] startKey               = Utils.StringToByteArray("N:0000000000000|T:0000001250847|");
            var    rangeParams            = new ByteRangeParams().StartKey(startKey).Prefix(prefix);
            ByteKeyValueIterator iterator = table.GetKeyValueIterator(rangeParams);

            var list = new List <KeyValuePair <byte[], byte[]> >();

            list.AddRange(iterator.Select(kv => kv));
        }
Exemplo n.º 3
0
        internal ByteRangeParams ToByteRangeParams()
        {
            ByteRangeParams ps = new ByteRangeParams();

            ps.prefix = Client.StringToByteArray(prefix);
            ps.startKey = Client.StringToByteArray(startKey);
            ps.endKey = Client.StringToByteArray(endKey);
            ps.count = count;
            ps.forwardDirection = forwardDirection;

            return ps;
        }