use of org.springframework.data.relational.core.sql.Condition in project spring-data-jdbc by spring-projects.
the class QueryMapperUnitTests method shouldMapOrCriteria.
// DATAJDBC-318
@Test
public void shouldMapOrCriteria() {
Criteria criteria = Criteria.where("name").is("foo").or("bar").is("baz");
Condition condition = map(criteria);
assertThat(condition).hasToString("person.\"NAME\" = ?[:name] OR person.bar = ?[:bar]");
}
use of org.springframework.data.relational.core.sql.Condition in project spring-data-jdbc by spring-projects.
the class QueryMapperUnitTests method shouldMapIsLike.
// DATAJDBC-318
@Test
public void shouldMapIsLike() {
Criteria criteria = Criteria.where("name").like("a");
Condition condition = map(criteria);
assertThat(condition).hasToString("person.\"NAME\" LIKE ?[:name]");
}
Aggregations