protected int parseFastQRYPRCTYP() throws DisconnectException { matchCodePoint(CodePoint.QRYPRCTYP); int qryprctyp = readFastUnsignedShort(); if ((qryprctyp != CodePoint.FIXROWPRC) && (qryprctyp != CodePoint.LMTBLKPRC)) { doValnsprmSemantics(CodePoint.QRYPRCTYP, qryprctyp); } return qryprctyp; }
private int parseSQLDTAGRPdataLabelsAndUpdateColumn(NetCursor cursor, int columnIndex, int tripletLength) throws DisconnectException { int numColumns = (tripletLength - 3) / 3; for (int i = columnIndex; i < columnIndex + numColumns; i++) { cursor.qrydscTypdef_.updateColumn(cursor, i, readFastUnsignedByte(), readFastUnsignedShort()); } return numColumns; }
protected int parseFastQRYPRCTYP() throws DisconnectException { matchCodePoint(CodePoint.QRYPRCTYP); int qryprctyp = readFastUnsignedShort(); if ((qryprctyp != CodePoint.FIXROWPRC) && (qryprctyp != CodePoint.LMTBLKPRC)) { doValnsprmSemantics(CodePoint.QRYPRCTYP, qryprctyp); } return qryprctyp; }
private int parseSQLDTAGRPdataLabelsAndUpdateColumn(NetCursor cursor, int columnIndex, int tripletLength) throws DisconnectException { int numColumns = (tripletLength - 3) / 3; for (int i = columnIndex; i < columnIndex + numColumns; i++) { cursor.qrydscTypdef_.updateColumn(cursor, i, readFastUnsignedByte(), readFastUnsignedShort()); } return numColumns; }
private String parseFastVCMorVCS() throws DisconnectException { String stringToBeSet = null; int vcm_length = readFastUnsignedShort(); if (vcm_length > 0) { stringToBeSet = readFastString(vcm_length, netAgent_.targetTypdef_.getCcsidMbcEncoding()); } int vcs_length = readFastUnsignedShort(); if (vcm_length > 0 && vcs_length > 0) { agent_.accumulateChainBreakingReadExceptionAndThrow(new DisconnectException(agent_, new ClientMessageId(SQLState.NET_VCM_VCS_LENGTHS_INVALID))); } else if (vcs_length > 0) { stringToBeSet = readFastString(vcs_length, netAgent_.targetTypdef_.getCcsidSbcEncoding()); } return stringToBeSet; }
private String parseFastVCMorVCS() throws DisconnectException { String stringToBeSet = null; int vcm_length = readFastUnsignedShort(); if (vcm_length > 0) { stringToBeSet = readFastString(vcm_length, netAgent_.targetTypdef_.getCcsidMbcEncoding()); } int vcs_length = readFastUnsignedShort(); if (vcm_length > 0 && vcs_length > 0) { agent_.accumulateChainBreakingReadExceptionAndThrow(new DisconnectException(agent_, new ClientMessageId(SQLState.NET_VCM_VCS_LENGTHS_INVALID))); } else if (vcs_length > 0) { stringToBeSet = readFastString(vcs_length, netAgent_.targetTypdef_.getCcsidSbcEncoding()); } return stringToBeSet; }
private void parseSQLDAGRP(ColumnMetaData columnMetaData, int columnNumber) throws DisconnectException { long columnLength = 0; // 2-byte precision int precision = readFastShort(); // 2-byte scale int scale = readFastShort(); // 8 byte sqllength columnLength = readFastLong(); // create a set method after sqlType and ccsid is read // possibly have it set the nullable int sqlType = readFastShort(); // 2-byte sqlccsid // (NOTE: SQLCCSID is always flown as BIG ENDIAN, not as data!) // The C-Common Client also does the following: // 1. Determine which type of code page is to be used for this variable: // 2. Map the CCSID to the correct codepage: // 3. "Split" the CCSID to see whether it is for SBCS or MBCS: int ccsid = readFastUnsignedShort(); columnMetaData.sqlPrecision_[columnNumber] = precision; columnMetaData.sqlScale_[columnNumber] = scale; columnMetaData.sqlLength_[columnNumber] = columnLength; columnMetaData.sqlType_[columnNumber] = sqlType; // Set the nullables columnMetaData.nullable_[columnNumber] = Utils.isSqlTypeNullable(sqlType); columnMetaData.sqlCcsid_[columnNumber] = ccsid; columnMetaData.types_[columnNumber] = Types.mapDERBYTypeToDriverType(true, sqlType, columnLength, ccsid); // true means isDescribed parseSQLDOPTGRP(columnMetaData, columnNumber); }
private void parseSQLDAGRP(ColumnMetaData columnMetaData, int columnNumber) throws DisconnectException { long columnLength = 0; // 2-byte precision int precision = readFastShort(); // 2-byte scale int scale = readFastShort(); // 8 byte sqllength columnLength = readFastLong(); // create a set method after sqlType and ccsid is read // possibly have it set the nullable int sqlType = readFastShort(); // 2-byte sqlccsid // (NOTE: SQLCCSID is always flown as BIG ENDIAN, not as data!) // The C-Common Client also does the following: // 1. Determine which type of code page is to be used for this variable: // 2. Map the CCSID to the correct codepage: // 3. "Split" the CCSID to see whether it is for SBCS or MBCS: int ccsid = readFastUnsignedShort(); columnMetaData.sqlPrecision_[columnNumber] = precision; columnMetaData.sqlScale_[columnNumber] = scale; columnMetaData.sqlLength_[columnNumber] = columnLength; columnMetaData.sqlType_[columnNumber] = sqlType; // Set the nullables columnMetaData.nullable_[columnNumber] = Utils.isSqlTypeNullable(sqlType); columnMetaData.sqlCcsid_[columnNumber] = ccsid; columnMetaData.types_[columnNumber] = Types.mapDERBYTypeToDriverType(true, sqlType, columnLength, ccsid); // true means isDescribed parseSQLDOPTGRP(columnMetaData, columnNumber); }
pkgsn = readFastUnsignedShort(); // Package Section Number. adjustLengths(ddmLength);
pkgsn = readFastUnsignedShort(); // Package Section Number. adjustLengths(ddmLength);