public void setBinaryStream(OptimizedElementArray row, int columnPosition, InputStream stream, long length, LobService lobService) throws SQLException { if (length <= Integer.MAX_VALUE) { setBlob(row, columnPosition, lobService.createBlob(stream, length)); } else { throw ThriftExceptionUtil.newSQLException( SQLState.BLOB_TOO_LARGE_FOR_CLIENT, null, length, Integer.MAX_VALUE); } }
@Override public void setDouble(OptimizedElementArray row, int columnPosition, double x) throws SQLException { // mark as non-null and call the underlying type's method getConverterForSet(row.setNotNull(columnPosition - 1), "double", columnPosition).setDouble(row, columnPosition, x); }
@Override public void setObject(OptimizedElementArray row, int columnPosition, Object x) throws SQLException { if (x != null) { // mark as non-null and call the underlying type's method getConverterForSet(row.setNotNull(columnPosition - 1), "object", columnPosition).setObject(row, columnPosition, x); } } };
public void setCharacterStream(OptimizedElementArray row, int columnPosition, Reader reader, long length, LobService lobService) throws SQLException { if (length <= Integer.MAX_VALUE) { setClob(row, columnPosition, lobService.createClob(reader, length)); } else { throw ThriftExceptionUtil.newSQLException( SQLState.BLOB_TOO_LARGE_FOR_CLIENT, null, length, Integer.MAX_VALUE); } }
@Override public void setBoolean(OptimizedElementArray row, int columnPosition, boolean x) throws SQLException { // mark as non-null and call the underlying type's method getConverterForSet(row.setNotNull(columnPosition - 1), "boolean", columnPosition).setBoolean(row, columnPosition, x); }
@Override public void setByte(OptimizedElementArray row, int columnPosition, byte x) throws SQLException { // mark as non-null and call the underlying type's method getConverterForSet(row.setNotNull(columnPosition - 1), "byte", columnPosition).setByte(row, columnPosition, x); }
@Override public void setInteger(OptimizedElementArray row, int columnPosition, int x) throws SQLException { // mark as non-null and call the underlying type's method getConverterForSet(row.setNotNull(columnPosition - 1), "int", columnPosition).setInteger(row, columnPosition, x); }
@Override public void setLong(OptimizedElementArray row, int columnPosition, long x) throws SQLException { // mark as non-null and call the underlying type's method getConverterForSet(row.setNotNull(columnPosition - 1), "long", columnPosition).setLong(row, columnPosition, x); }
@Override public void setString(OptimizedElementArray row, int columnPosition, String x) throws SQLException { if (x != null) { // mark as non-null and call the underlying type's method getConverterForSet(row.setNotNull(columnPosition - 1), "string", columnPosition).setString(row, columnPosition, x); } }
@Override public void setBytes(OptimizedElementArray row, int columnPosition, byte[] x) throws SQLException { if (x != null) { // mark as non-null and call the underlying type's method getConverterForSet(row.setNotNull(columnPosition - 1), "byte[]", columnPosition).setBytes(row, columnPosition, x); } }
@Override public void setBlob(OptimizedElementArray row, int columnPosition, Blob x) throws SQLException { if (x != null) { // mark as non-null and call the underlying type's method getConverterForSet(row.setNotNull(columnPosition - 1), "blob", columnPosition).setBlob(row, columnPosition, x); } }
@Override public void setAsciiStream(OptimizedElementArray row, int columnPosition, InputStream stream, long length, LobService lobService) throws SQLException { if (stream != null) { // mark as non-null and call the underlying type's method getConverterForSet(row.setNotNull(columnPosition - 1), "AsciiStream", columnPosition).setAsciiStream(row, columnPosition, stream, length, lobService); } }
@Override public void setTimestamp(OptimizedElementArray row, int columnPosition, Timestamp x) throws SQLException { if (x != null) { // mark as non-null and call the underlying type's method getConverterForSet(row.setNotNull(columnPosition - 1), "timestamp", columnPosition).setTimestamp(row, columnPosition, x); } }
@Override public void setShort(OptimizedElementArray row, int columnPosition, short x) throws SQLException { // mark as non-null and call the underlying type's method getConverterForSet(row.setNotNull(columnPosition - 1), "short", columnPosition).setShort(row, columnPosition, x); }
@Override public void setFloat(OptimizedElementArray row, int columnPosition, float x) throws SQLException { // mark as non-null and call the underlying type's method getConverterForSet(row.setNotNull(columnPosition - 1), "float", columnPosition).setFloat(row, columnPosition, x); }
@Override public void setBinaryStream(OptimizedElementArray row, int columnPosition, InputStream stream, long length, LobService lobService) throws SQLException { if (stream != null) { // mark as non-null and call the underlying type's method getConverterForSet(row.setNotNull(columnPosition - 1), "BinaryStream", columnPosition).setBinaryStream(row, columnPosition, stream, length, lobService); } }
@Override public void setCharacterStream(OptimizedElementArray row, int columnPosition, Reader reader, long length, LobService lobService) throws SQLException { if (reader != null) { // mark as non-null and call the underlying type's method getConverterForSet(row.setNotNull(columnPosition - 1), "CharacterStream", columnPosition).setCharacterStream(row, columnPosition, reader, length, lobService); } }
protected final short getShort(final int columnIndex, final int snappyTypeValue, final Row row) throws SQLException { ColumnValueConverter cvc = Converters.getConverter( snappyTypeValue, "short", false, columnIndex); short v = cvc.toShort(row, columnIndex); this.wasNull = cvc.isNull(); return v; }
protected final BigDecimal getBigDecimal(final int columnIndex, final int snappyTypeValue, final Row row) throws SQLException { ColumnValueConverter cvc = Converters.getConverter( snappyTypeValue, "BigDecimal", false, columnIndex); BigDecimal v = cvc.toBigDecimal(row, columnIndex); this.wasNull = (v == null); return v; }
protected final InputStream getAsciiStream(final int columnIndex, final int snappyTypeValue, final Row row) throws SQLException { ColumnValueConverter cvc = Converters.getConverter( snappyTypeValue, "AsciiStream", false, columnIndex); InputStream v = cvc.toAsciiStream(row, columnIndex, this.service); this.wasNull = (v == null); return v; }