use of com.yahoo.elide.core.filter.expression.FilterExpression in project elide by yahoo.
the class RSQLFilterDialectTest method testIsnullOperatorBool.
@Test
public void testIsnullOperatorBool() throws Exception {
MultivaluedMap<String, String> queryParams = new MultivaluedHashMap<>();
queryParams.add("filter", "title=isnull=true");
FilterExpression expression = dialect.parseGlobalExpression("/book", queryParams, NO_VERSION);
assertEquals("book.title ISNULL []", expression.toString());
}
use of com.yahoo.elide.core.filter.expression.FilterExpression in project elide by yahoo.
the class RSQLFilterDialectTest method testInOperator.
@Test
public void testInOperator() throws Exception {
MultivaluedMap<String, String> queryParams = new MultivaluedHashMap<>();
queryParams.add("filter", "title=in=Hemingway");
FilterExpression expression = dialect.parseGlobalExpression("/book", queryParams, NO_VERSION);
assertEquals("book.title IN [Hemingway]", expression.toString());
}
use of com.yahoo.elide.core.filter.expression.FilterExpression in project elide by yahoo.
the class RSQLFilterDialectTest method testOutOperator.
@Test
public void testOutOperator() throws Exception {
MultivaluedMap<String, String> queryParams = new MultivaluedHashMap<>();
queryParams.add("filter", "title=out=Hemingway");
FilterExpression expression = dialect.parseGlobalExpression("/book", queryParams, NO_VERSION);
assertEquals("NOT (book.title IN [Hemingway])", expression.toString());
}
use of com.yahoo.elide.core.filter.expression.FilterExpression in project elide by yahoo.
the class RSQLFilterDialectTest method testInInsensitiveOperator.
@Test
public void testInInsensitiveOperator() throws Exception {
MultivaluedMap<String, String> queryParams = new MultivaluedHashMap<>();
queryParams.add("filter", "title=ini=Hemingway");
FilterExpression expression = dialect.parseGlobalExpression("/book", queryParams, NO_VERSION);
assertEquals("book.title IN_INSENSITIVE [Hemingway]", expression.toString());
}
use of com.yahoo.elide.core.filter.expression.FilterExpression in project elide by yahoo.
the class RSQLFilterDialectWithFIQLCompliantStrategyTest method testNotnullOperatorBool.
@Test
public void testNotnullOperatorBool() throws Exception {
MultivaluedMap<String, String> queryParams = new MultivaluedHashMap<>();
queryParams.add("filter", "title=isnull=false");
FilterExpression expression = dialect.parseGlobalExpression("/book", queryParams, NO_VERSION);
assertEquals("book.title NOTNULL []", expression.toString());
}
Aggregations