use of jakarta.nosql.query.StringQueryValue in project jnosql-diana by eclipse.
the class DeleteQueryProviderTest method shouldReturnParserQuery9.
@ParameterizedTest(name = "Should parser the query {0}")
@ValueSource(strings = { "delete from God where name = \"diana\"" })
public void shouldReturnParserQuery9(String query) {
DeleteQuery deleteQuery = checkDeleteFromStart(query);
assertTrue(deleteQuery.getWhere().isPresent());
Where where = deleteQuery.getWhere().get();
Condition condition = where.getCondition();
QueryValue<?> value = condition.getValue();
Assertions.assertEquals(Operator.EQUALS, condition.getOperator());
assertEquals("name", condition.getName());
assertTrue(value instanceof StringQueryValue);
assertEquals("diana", value.get());
}
use of jakarta.nosql.query.StringQueryValue in project jnosql-diana by eclipse.
the class DeleteQueryProviderTest method shouldReturnParserQuery16.
@ParameterizedTest(name = "Should parser the query {0}")
@ValueSource(strings = { "delete from God where name like \"Ada\"" })
public void shouldReturnParserQuery16(String query) {
DeleteQuery deleteQuery = checkDeleteFromStart(query);
assertTrue(deleteQuery.getWhere().isPresent());
Where where = deleteQuery.getWhere().get();
Condition condition = where.getCondition();
QueryValue<?> value = condition.getValue();
Assertions.assertEquals(Operator.LIKE, condition.getOperator());
assertEquals("name", condition.getName());
assertTrue(value instanceof StringQueryValue);
assertEquals("Ada", StringQueryValue.class.cast(value).get());
}
Aggregations