private List<List<Object>> list2(Meta.MetaResultSet resultSet) { final Meta.StatementHandle h = new Meta.StatementHandle( resultSet.connectionId, resultSet.statementId, null); final List<TypedValue> parameterValues = Collections.emptyList(); final Iterable<Object> iterable = meta.createIterable(h, null, resultSet.signature, parameterValues, resultSet.firstFrame); final List<List<Object>> list = new ArrayList<>(); return MetaImpl.collect(resultSet.signature.cursorFactory, iterable, list); }
/** * Executes this result set. (Not a JDBC method.) * * <p>Note that execute cannot occur in the constructor, because the * constructor occurs while the statement is locked, to make sure that * execute/cancel don't happen at the same time.</p> * * @see org.apache.calcite.avatica.AvaticaConnection.Trojan#execute(AvaticaResultSet) * * @throws SQLException if execute fails for some reason. */ protected AvaticaResultSet execute() throws SQLException { final Iterable<Object> iterable1 = statement.connection.meta.createIterable(statement.handle, state, signature, Collections.<TypedValue>emptyList(), firstFrame); this.cursor = MetaImpl.createCursor(signature.cursorFactory, iterable1); this.accessorList = cursor.createAccessors(columnMetaDataList, localCalendar, this); this.row = 0; this.beforeFirst = true; this.afterLast = false; return this; }
/** * Executes this result set. (Not a JDBC method.) * * <p>Note that execute cannot occur in the constructor, because the * constructor occurs while the statement is locked, to make sure that * execute/cancel don't happen at the same time.</p> * * @see org.apache.calcite.avatica.AvaticaConnection.Trojan#execute(AvaticaResultSet) * * @throws SQLException if execute fails for some reason. */ protected AvaticaResultSet execute() throws SQLException { final Iterable<Object> iterable1 = statement.connection.meta.createIterable(statement.handle, state, signature, Collections.<TypedValue>emptyList(), firstFrame); this.cursor = MetaImpl.createCursor(signature.cursorFactory, iterable1); this.accessorList = cursor.createAccessors(columnMetaDataList, localCalendar, this); this.row = 0; this.beforeFirst = true; this.afterLast = false; return this; }
/** * Executes this result set. (Not a JDBC method.) * * <p>Note that execute cannot occur in the constructor, because the * constructor occurs while the statement is locked, to make sure that * execute/cancel don't happen at the same time.</p> * * @see org.apache.calcite.avatica.AvaticaConnection.Trojan#execute(AvaticaResultSet) * * @throws SQLException if execute fails for some reason. */ protected AvaticaResultSet execute() throws SQLException { final List<TypedValue> parameterValues = statement.getBoundParameterValues(); final Iterable<Object> iterable1 = statement.connection.meta.createIterable(statement.handle, state, signature, parameterValues, firstFrame); this.cursor = MetaImpl.createCursor(signature.cursorFactory, iterable1); this.accessorList = cursor.createAccessors(columnMetaDataList, localCalendar, this); this.row = -1; this.afterLast = false; return this; }