use of com.apple.foundationdb.record.metadata.expressions.QueryableKeyExpression in project fdb-record-layer by FoundationDB.
the class QueryToKeyMatcherTest method testMatchWithQueryableExpression.
@Test
public void testMatchWithQueryableExpression() {
final QueryableKeyExpression key = (QueryableKeyExpression) function("nada", concatenateFields("f1", "f2", "f3"));
final QueryToKeyMatcher matcher = new QueryToKeyMatcher(Query.keyExpression(key).equalsValue("hello!"));
Match match = matcher.matchesSatisfyingQuery(key);
assertEquals(MatchType.EQUALITY, match.getType());
assertEquals(Key.Evaluated.scalar("hello!"), match.getEquality());
}
Aggregations