コード例 #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
ファイル: AutoModifyQuery.java プロジェクト: bufferings/doma
 @Override
 public String toString() {
   return sql != null ? sql.toString() : null;
 }