private int completeSplitRow(int index) throws DisconnectException, SqlException { int lastValidBytePositionBeforeFetch = 0; if (netResultSet_ != null && netResultSet_.scrollable_) { lastValidBytePositionBeforeFetch = lastValidBytePosition_; netResultSet_.flowFetchToCompleteRowset(); } else { // Shift partial row to the beginning of the dataBuffer shiftPartialRowToBeginning(); adjustColumnOffsetsForColumnsPreviouslyCalculated(index); resetCurrentRowPosition(); lastValidBytePositionBeforeFetch = lastValidBytePosition_; netResultSet_.flowFetch(); } return lastValidBytePositionBeforeFetch; }
/** * Scan the data buffer to see if end of data (SQL state 02000) * has been received. This method should only be called when the * cursor is being closed since the pointer to the current row can * be modified. * * @exception SqlException */ void scanDataBufferForEndOfData() throws SqlException { while (!allRowsReceivedFromServer() && (position_ != lastValidBytePosition_)) { stepNext(false); } }
int ensureSpaceForDataBuffer(int ddmLength) { if (dataBuffer_ == null) { allocateDataBuffer();
protected void parseRowset_() throws SqlException { int row = 0; // Parse all the rows received in the rowset // The index we are passing will keep track of which row in the rowset we are parsing // so we can reuse the columnDataPosition/Length/IsNull arrays. while (netCursor_.calculateColumnOffsetsForRow_(row, true)) { rowsReceivedInCurrentRowset_++; row++; } // if rowset is not complete and an endqryrm was received, will skip the while loop // and go to the checkAndThrow method. otherwise flow an cntqry to try to complete // the rowset. // -- there is no need to complete the rowset for rowset cursors. fetching stops when // the end of data is returned or when an error occurs. all successfully fetched rows // are returned to the user. the specific error is not returned until the next fetch. while (rowsReceivedInCurrentRowset_ != fetchSize_ && !netCursor_.allRowsReceivedFromServer() && !isRowsetCursor_ && sensitivity_ != sensitivity_sensitive_dynamic__ && sensitivity_ != sensitivity_sensitive_static__) { flowFetchToCompleteRowset(); while (netCursor_.calculateColumnOffsetsForRow_(row, true)) { rowsReceivedInCurrentRowset_++; row++; } } checkAndThrowReceivedQueryTerminatingException(); }
NetSqlca[] netSqlca = this.parseSQLCARD(qrydscTypdef_); daNullIndicator = readFdocaOneByte(); } else { if (sqlcode == SqlCode.END_OF_DATA.getCode()) { setAllRowsReceivedFromServer(true); if (netResultSet_ != null && netSqlca[i].containsSqlcax()) { setIsUpdataDeleteHole(rowIndex, receivedDeleteHoleWarning); setIsRowUpdated(receivedRowUpdatedWarning); if (allRowsReceivedFromServer() && (position_ == lastValidBytePosition_)) { markNextRowPosition(); makeNextRowPositionCurrent(); return false; incrementRowsReadEvent(); columnDataPosition = allocateColumnDataPositionArray(rowIndex); columnDataComputedLength = allocateColumnDataComputedLengthArray(rowIndex); columnDataIsNull = allocateColumnDataIsNullArray(rowIndex); setIsUpdataDeleteHole(rowIndex, false); } else { allocateColumnOffsetAndLengthArrays();
cursor.initializeColumnInfoArrays(netAgent_.targetTypdef_, columns, netAgent_.targetSqlam_); columnCount += parseSQLDTAGRPdataLabelsAndUpdateColumn(cursor, columnCount, tripletLength); break; cursor.allocateCharBuffer();
(netAgent_, (NetStatement) statement.materialStatement_, new NetCursor(netAgent_, qryprctyp), (rs.resultSetType_ == java.sql.ResultSet.TYPE_FORWARD_ONLY) && netAgent_.netConnection_.serverSupportsQryclsimp(); rs.netCursor_.setQryclsimpEnabled(qryclsimp);
NetSqlca[] netSqlca = this.parseSQLCARD(qrydscTypdef_); daNullIndicator = readFdocaOneByte(); } else { if (sqlcode == SqlCode.END_OF_DATA.getCode()) { setAllRowsReceivedFromServer(true); if (netResultSet_ != null && netSqlca[i].containsSqlcax()) { setIsUpdataDeleteHole(rowIndex, receivedDeleteHoleWarning); setIsRowUpdated(receivedRowUpdatedWarning); if (allRowsReceivedFromServer() && (position_ == lastValidBytePosition_)) { markNextRowPosition(); makeNextRowPositionCurrent(); return false; incrementRowsReadEvent(); columnDataPosition = allocateColumnDataPositionArray(rowIndex); columnDataComputedLength = allocateColumnDataComputedLengthArray(rowIndex); columnDataIsNull = allocateColumnDataIsNullArray(rowIndex); setIsUpdataDeleteHole(rowIndex, false); } else { allocateColumnOffsetAndLengthArrays();
protected void parseRowset_() throws SqlException { int row = 0; // Parse all the rows received in the rowset // The index we are passing will keep track of which row in the rowset we are parsing // so we can reuse the columnDataPosition/Length/IsNull arrays. while (netCursor_.calculateColumnOffsetsForRow_(row, true)) { rowsReceivedInCurrentRowset_++; row++; } // if rowset is not complete and an endqryrm was received, will skip the while loop // and go to the checkAndThrow method. otherwise flow an cntqry to try to complete // the rowset. // -- there is no need to complete the rowset for rowset cursors. fetching stops when // the end of data is returned or when an error occurs. all successfully fetched rows // are returned to the user. the specific error is not returned until the next fetch. while (rowsReceivedInCurrentRowset_ != fetchSize_ && !netCursor_.allRowsReceivedFromServer() && !isRowsetCursor_ && sensitivity_ != sensitivity_sensitive_dynamic__ && sensitivity_ != sensitivity_sensitive_static__) { flowFetchToCompleteRowset(); while (netCursor_.calculateColumnOffsetsForRow_(row, true)) { rowsReceivedInCurrentRowset_++; row++; } } checkAndThrowReceivedQueryTerminatingException(); }
cursor.initializeColumnInfoArrays(netAgent_.targetTypdef_, columns, netAgent_.targetSqlam_); columnCount += parseSQLDTAGRPdataLabelsAndUpdateColumn(cursor, columnCount, tripletLength); break; cursor.allocateCharBuffer();
(netAgent_, (NetStatement) statement.materialStatement_, new NetCursor(netAgent_, qryprctyp), (rs.resultSetType_ == java.sql.ResultSet.TYPE_FORWARD_ONLY) && netAgent_.netConnection_.serverSupportsQryclsimp(); rs.netCursor_.setQryclsimpEnabled(qryclsimp);
private int completeSplitRow(int index) throws DisconnectException, SqlException { int lastValidBytePositionBeforeFetch = 0; if (netResultSet_ != null && netResultSet_.scrollable_) { lastValidBytePositionBeforeFetch = lastValidBytePosition_; netResultSet_.flowFetchToCompleteRowset(); } else { // Shift partial row to the beginning of the dataBuffer shiftPartialRowToBeginning(); adjustColumnOffsetsForColumnsPreviouslyCalculated(index); resetCurrentRowPosition(); lastValidBytePositionBeforeFetch = lastValidBytePosition_; netResultSet_.flowFetch(); } return lastValidBytePositionBeforeFetch; }
/** * Scan the data buffer to see if end of data (SQL state 02000) * has been received. This method should only be called when the * cursor is being closed since the pointer to the current row can * be modified. * * @exception SqlException */ void scanDataBufferForEndOfData() throws SqlException { while (!allRowsReceivedFromServer() && (position_ != lastValidBytePosition_)) { stepNext(false); } }
int ensureSpaceForDataBuffer(int ddmLength) { if (dataBuffer_ == null) { allocateDataBuffer();