Пример #1
0
 public void testLimitOnly() throws Exception {
   String expected = "select * from emp order by emp.id limit 10";
   H2PagingTransformer transformer = new H2PagingTransformer(-1, 10);
   SqlParser parser = new SqlParser("select * from emp order by emp.id");
   SqlNode sqlNode = transformer.transform(parser.parse());
   NodePreparedSqlBuilder sqlBuilder =
       new NodePreparedSqlBuilder(new MockConfig(), SqlKind.SELECT, "dummyPath");
   PreparedSql sql = sqlBuilder.build(sqlNode);
   assertEquals(expected, sql.getRawSql());
 }
Пример #2
0
 @Override
 public String toString() {
   return sql != null ? sql.toString() : null;
 }