use of ai.grakn.graql.Match in project grakn by graknlabs.
the class MatchTest method testIntPredicateQuery.
@Test
public void testIntPredicateQuery() {
Match query = qb.match(x.has("tmdb-vote-count", lte(400)));
assertThat(query, variable(x, containsInAnyOrder(apocalypseNow, theMuppets, chineseCoffee)));
}
use of ai.grakn.graql.Match in project grakn by graknlabs.
the class MatchTest method testHasReleaseDate.
@Test
public void testHasReleaseDate() {
Match query = qb.match(x.has("release-date", y));
assertThat(query, variable(x, containsInAnyOrder(godfather, theMuppets, spy, chineseCoffee)));
}
use of ai.grakn.graql.Match in project grakn by graknlabs.
the class MatchTest method testDoublePredicateQuery.
@Test
public void testDoublePredicateQuery() {
Match query = qb.match(x.has("tmdb-vote-average", gt(7.8)));
assertThat(query, variable(x, containsInAnyOrder(apocalypseNow, godfather)));
}
use of ai.grakn.graql.Match in project grakn by graknlabs.
the class MatchTest method testTypeAsVariable.
@Test
public void testTypeAsVariable() {
Match query = qb.match(label("genre").plays(x));
assertThat(query, variable(x, containsInAnyOrder(genreOfProduction, keyNameOwner)));
}
use of ai.grakn.graql.Match in project grakn by graknlabs.
the class MatchTest method testMatchHas.
@Test
public void testMatchHas() {
Match query = qb.match(x.has("name"));
assertThat(query, variable(x, containsInAnyOrder(person, language, genre, cluster, character)));
}
Aggregations