コード例 #1
0
 @Override
 public String processSql(String sql, RowSelection selection) {
   if (LimitHelper.hasFirstRow(selection)) {
     throw new UnsupportedOperationException("query result offset is not supported");
   }
   return sql + " fetch first " + getMaxOrLimit(selection) + " rows only";
 }
コード例 #2
0
 @Override
 public String processSql(String sql, RowSelection selection) {
   final boolean hasOffset = LimitHelper.hasFirstRow(selection);
   return new StringBuilder(sql.length() + 20)
       .append(sql)
       .insert(6, hasOffset ? " first ? skip ?" : " first ?")
       .toString();
 }