All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.sap.cds.jdbc.hana.HanaBinder Maven / Gradle / Ivy

There is a newer version: 3.4.0
Show newest version
/************************************************************************
 * © 2021-2022 SAP SE or an SAP affiliate company. All rights reserved. *
 ************************************************************************/
package com.sap.cds.jdbc.hana;

import java.io.InputStream;
import java.io.Reader;
import java.sql.Blob;
import java.sql.NClob;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.util.TimeZone;

import com.sap.cds.jdbc.generic.GenericBinder;

// package private
class HanaBinder extends GenericBinder {

	// package private
	HanaBinder(TimeZone timeZone) {
		// no public construction
		super(7, timeZone);
	}

	@Override
	protected Reader getLargeString(ResultSet result, int i) throws SQLException {
		NClob nClob = result.getNClob(i);
		return null == nClob ? null : nClob.getCharacterStream();
	}

	@Override
	protected InputStream getLargeBinary(ResultSet result, int i) throws SQLException {
		Blob blob = result.getBlob(i);
		return null == blob ? null : blob.getBinaryStream();
	}
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy