Prefix() public method

Specify the prefix parameter for iteration.
Only keys starting with prefix will be returned by the iteration.
public Prefix ( string prefix ) : StringRangeParams
prefix string The prefix parameter as a string.
return StringRangeParams
Beispiel #1
0
        public void ListTest29(Table tbl, uint num)
        {
            for (uint i = 0; i < (num/1000); i++)
            {
                StringRangeParams ps = new StringRangeParams();
                ps.Prefix("00000000" + i.ToString("D2"));
                ps.Backward();

                uint expected = 1000;
                PerformListTest(tbl, ps, expected);
            }
        }
Beispiel #2
0
        public void ListTest17(Table tbl, uint num)
        {
            StringRangeParams ps = new StringRangeParams();
            ps.Prefix("000000002");
            ps.Backward();

            uint expected = 2000;
            PerformListTest(tbl, ps, expected);
        }
Beispiel #3
0
        public void ListTest19(Table tbl, uint num)
        {
            StringRangeParams ps = new StringRangeParams();
            ps.StartKey(Utils.Id(12000));
            ps.Prefix("0000000013");
            ps.Backward();

            uint expected = 0;
            PerformListTest(tbl, ps, expected);
        }
Beispiel #4
0
        public void ListTest12(Table tbl, uint num)
        {
            StringRangeParams ps = new StringRangeParams();
            ps.StartKey(Utils.Id(10000));
            ps.EndKey(Utils.Id(15000));
            ps.Prefix("0000000012");

            uint expected = 1000;
            PerformListTest(tbl, ps, expected);
        }