public void QueryPredicate1()
        {
            int begin = 10;
            int end   = 45;

            Statement stmt = new Statement();

            stmt.SetNamespace(args.ns);
            stmt.SetSetName(setName);
            stmt.SetFilter(Filter.Range(binName, begin, end));
            stmt.SetPredExp(
                PredExp.IntegerBin("bin2"),
                PredExp.IntegerValue(40),
                PredExp.IntegerGreater(),
                PredExp.IntegerBin("bin2"),
                PredExp.IntegerValue(44),
                PredExp.IntegerLess(),
                PredExp.And(2),
                PredExp.IntegerBin("bin2"),
                PredExp.IntegerValue(22),
                PredExp.IntegerEqual(),
                PredExp.IntegerBin("bin2"),
                PredExp.IntegerValue(9),
                PredExp.IntegerEqual(),
                PredExp.Or(3),
                PredExp.IntegerBin(binName),
                PredExp.IntegerBin("bin2"),
                PredExp.IntegerEqual(),
                PredExp.And(2)
                );

            RecordSet rs = client.Query(null, stmt);

            try
            {
                int count = 0;

                while (rs.Next())
                {
                    //Console.WriteLine(rs.Record.GetValue(binName));
                    count++;
                }
                // 22, 41, 42, 43
                Assert.AreEqual(4, count);
            }
            finally
            {
                rs.Close();
            }
        }
        private void RunQuery2(AerospikeClient client, Arguments args, string binName)
        {
            int begin = 10;
            int end   = 40;

            console.Info("Query Predicate: Record updated on 2017-01-15");
            DateTime beginTime = new DateTime(2017, 1, 15);
            DateTime endTime   = new DateTime(2017, 1, 16);

            Statement stmt = new Statement();

            stmt.SetNamespace(args.ns);
            stmt.SetSetName(args.set);
            stmt.SetFilter(Filter.Range(binName, begin, end));
            stmt.SetPredExp(
                PredExp.RecLastUpdate(),
                PredExp.IntegerValue(beginTime),
                PredExp.IntegerGreaterEq(),
                PredExp.RecLastUpdate(),
                PredExp.IntegerValue(endTime),
                PredExp.IntegerLess(),
                PredExp.And(2)
                );

            RecordSet rs = client.Query(null, stmt);

            try
            {
                while (rs.Next())
                {
                    Record record = rs.Record;
                    console.Info("Record: " + record.ToString());
                }
            }
            finally
            {
                rs.Close();
            }
        }