示例#1
0
 final RecordSetImpl executeQueryTop(long rowCount) {
   this.adapter.checkAccessible();
   if (this.statement instanceof QueryStatementImpl) {
     RecordSetImpl rs = new RecordSetImpl((QueryStatementImpl) this.statement);
     try {
       rs.loadRecordSet(this.ensureTopQuerier().executeQuery(this.argValueObj, rowCount));
     } catch (SQLException e) {
       throw Utils.tryThrowException(e);
     }
     return rs;
   }
   throw new UnsupportedOperationException("语句定义不支持该操作");
 }
示例#2
0
 final void iterateQuery(RecordIterateAction action) {
   this.adapter.checkAccessible();
   if (action == null) {
     throw new NullArgumentException("查询迭代操作");
   }
   if (this.statement instanceof QueryStatementImpl) {
     final RecordSetImpl rs = new RecordSetImpl((QueryStatementImpl) this.statement);
     try {
       rs.iterateResultSet(
           this.adapter.getContext(), this.executor.executeQuery(this.argValueObj), action);
     } catch (Throwable e) {
       throw Utils.tryThrowException(e);
     }
     return;
   }
   throw new UnsupportedOperationException();
 }