public void NotPrefixTest()
        {
            KiiBucket bucket = KiiUser.CurrentUser.Bucket("my_bucket");
            KiiObject obj1   = bucket.NewKiiObject();

            obj1["name"] = "foo";
            obj1.Save();
            KiiObject obj2 = bucket.NewKiiObject();

            obj2["name"] = "fool";
            obj2.Save();
            KiiObject obj3 = bucket.NewKiiObject();

            obj3["name"] = "hoge";
            obj3.Save();

            KiiQuery query = new KiiQuery(KiiClause.Not(KiiClause.StartsWith("name", "foo")));

            query.SortByAsc("name");

            KiiQueryResult <KiiObject> results = bucket.Query(query);

            Assert.AreEqual(1, results.Count);
            Assert.AreEqual("hoge", results[0].GetString("name"));
        }
Beispiel #2
0
 public void Test_0602_StartWith_value_null()
 {
     KiiClause.StartsWith("name", null);
 }
Beispiel #3
0
 public void Test_0601_StartWith_key_empty()
 {
     KiiClause.StartsWith("", "kii");
 }
Beispiel #4
0
 public void Test_0601_StartWith_key_null()
 {
     KiiClause.StartsWith(null, "kii");
 }
Beispiel #5
0
        public void Test_0600_StartWith()
        {
            KiiClause c = KiiClause.StartsWith("name", "ki");

            Assert.AreEqual("{\"type\":\"prefix\",\"field\":\"name\",\"prefix\":\"ki\"}", c.ToJson().ToString());
        }