Initial add of SpiNamedParam

This commit is contained in:
Robin Bygrave
2016-07-12 20:45:33 +12:00
parent 86faa947af
commit 1a1c432c2a
11 changed files with 153 additions and 36 deletions
@@ -37,7 +37,7 @@ public class EqlParserTest {
assertThat(query.getGeneratedSql()).contains("where t0.name = ?");
}
@Test @Ignore
@Test
public void where_namedParam() throws Exception {
Query<Customer> query = parse("where name eq :name");
@@ -47,6 +47,16 @@ public class EqlParserTest {
assertThat(query.getGeneratedSql()).contains("where t0.name = ?");
}
// @Test
// public void where_namedParam_startsWith() throws Exception {
//
// Query<Customer> query = parse("where name startsWith :name");
// query.setParameter("name", "Rob");
// query.findList();
//
// assertThat(query.getGeneratedSql()).contains("where t0.name like ?");
// }
@Test
public void where_or1() throws Exception {