@Alias(value="ClobCharacterStreamTypeHandler") public class ClobCharacterStreamTypeHandler extends org.apache.ibatis.type.BaseTypeHandler<String>
TypeHandler
that uses ResultSet.getCharacterStream(String)
and ResultSet.getCharacterStream(int)
to convert a Clob into a string. The Postgresql JDBC driver has a bug when reading from clob, and MyBatis uses Clob
to read the contents.Constructor and Description |
---|
ClobCharacterStreamTypeHandler() |
Modifier and Type | Method and Description |
---|---|
String |
getNullableResult(CallableStatement cs,
int columnIndex) |
String |
getNullableResult(ResultSet rs,
int columnIndex) |
String |
getNullableResult(ResultSet rs,
String columnName) |
protected static String |
read(Reader reader) |
void |
setNonNullParameter(PreparedStatement ps,
int i,
String parameter,
org.apache.ibatis.type.JdbcType jdbcType) |
public void setNonNullParameter(PreparedStatement ps, int i, String parameter, org.apache.ibatis.type.JdbcType jdbcType) throws SQLException
setNonNullParameter
in class org.apache.ibatis.type.BaseTypeHandler<String>
SQLException
public String getNullableResult(ResultSet rs, String columnName) throws SQLException
getNullableResult
in class org.apache.ibatis.type.BaseTypeHandler<String>
SQLException
public String getNullableResult(ResultSet rs, int columnIndex) throws SQLException
getNullableResult
in class org.apache.ibatis.type.BaseTypeHandler<String>
SQLException
public String getNullableResult(CallableStatement cs, int columnIndex) throws SQLException
getNullableResult
in class org.apache.ibatis.type.BaseTypeHandler<String>
SQLException
protected static String read(Reader reader) throws IOException
IOException
Copyright © 2019. All rights reserved.