@Override protected X doExtract(ResultSet rs, String name, WrapperOptions options) throws SQLException { Blob rsBlob = rs.getBlob( name ); if ( rsBlob == null || rsBlob.length() < HANABlobTypeDescriptor.this.maxLobPrefetchSize ) { return javaTypeDescriptor.wrap( rsBlob, options ); } Blob blob = new MaterializedBlob( DataHelper.extractBytes( rsBlob.getBinaryStream() ) ); return javaTypeDescriptor.wrap( blob, options ); }
@Override protected X doExtract(ResultSet rs, String name, WrapperOptions options) throws SQLException { Blob rsBlob = rs.getBlob( name ); if ( rsBlob == null || rsBlob.length() < HANAStreamBlobTypeDescriptor.this.maxLobPrefetchSize ) { return javaTypeDescriptor.wrap( rsBlob, options ); } Blob blob = new MaterializedBlob( DataHelper.extractBytes( rsBlob.getBinaryStream() ) ); return javaTypeDescriptor.wrap( blob, options ); }
@Override protected X doExtract(ResultSet rs, int position, ExecutionContext executionContext) throws SQLException { Blob rsBlob = rs.getBlob( position ); if ( rsBlob == null || rsBlob.length() < HANAStreamBlobTypeDescriptor.this.maxLobPrefetchSize ) { return javaTypeDescriptor.wrap( rsBlob, executionContext.getSession() ); } Blob blob = new MaterializedBlob( LobStreamDataHelper.extractBytes( rsBlob.getBinaryStream() ) ); return javaTypeDescriptor.wrap( blob, executionContext.getSession() ); }
@Override protected X doExtract( ResultSet rs, int position, ExecutionContext executionContext) throws SQLException { Blob rsBlob = rs.getBlob( position ); if ( rsBlob == null || rsBlob.length() < HANABlobTypeDescriptor.this.maxLobPrefetchSize ) { return javaTypeDescriptor.wrap( rsBlob, executionContext.getSession() ); } Blob blob = new MaterializedBlob( LobStreamDataHelper.extractBytes( rsBlob.getBinaryStream() ) ); return javaTypeDescriptor.wrap( blob, executionContext.getSession() ); }