示例#1
0
 public void Predicates_Inside()
 {
     using (var client = TestDatabase.GetClient("predicates_inside"))
     {
         client.Execute(VertexQuery.Create("test").AddProperty("age", 30)).Wait();
         Assert.AreEqual(1, client.Execute(VertexQuery.All().Values("age").Is(GraphPredicate.Inside(age - 1, age + 1))).Result.Count());
         Assert.AreEqual(0, client.Execute(VertexQuery.All().Values("age").Is(GraphPredicate.Inside(age + 1, age + 2))).Result.Count());
     }
 }
示例#2
0
 public void Steps_Is()
 {
     using (var client = TestDatabase.GetClient("is"))
     {
         client.Execute(VertexQuery.Create("foo").AddProperty("age", 30)).Wait();
         Assert.AreEqual(client.Execute(VertexQuery.All().Values("age").Is(30).Count()).Result.First(), 1);
         Assert.AreEqual(client.Execute(VertexQuery.All().Values("age").Is(40).Count()).Result.First(), 0);
         Assert.AreEqual(client.Execute(VertexQuery.All().Values("age").Is(GraphPredicate.Inside(25, 35)).Count()).Result.First(), 1);
     }
 }