public class PostgreSQLDatabaseType extends StaticSQLDatabaseType
_driver, _driverNotFoundMessage, _id, _label, _languageEscapeTableNameTemplate, _languageLimitQueryTemplate, _pluginName, _template, _validationQuery
Constructor and Description |
---|
PostgreSQLDatabaseType() |
Modifier and Type | Method and Description |
---|---|
InputStream |
getBlob(ResultSet resultSet,
int pos)
Get the InputStream to read a blob
|
InputStream |
getBlob(ResultSet resultSet,
String columnName)
Get the InputStream to read a blob
|
void |
setBlob(PreparedStatement statement,
int pos,
byte[] bytes)
Set an array of bytes (UTF-8 encoded) into a blob, if you want to pass a String, you can use
SQLDatabaseType.setBlob(PreparedStatement, int, String) |
void |
setBlob(PreparedStatement statement,
int pos,
InputStream is,
long length)
Set an array of bytes (UTF-8 encoded) into a blob, if you want to pass a String, you can use
SQLDatabaseType.setBlob(PreparedStatement, int, String) |
void |
setBlob(PreparedStatement statement,
int pos,
String blob)
Set an String into a blob
|
configure, getDriver, getDriverNotFoundMessage, getId, getLabel, getTemplate, getValidationQuery, languageEscapeTableName, languageLimitQuery, setPluginInfo
getLogger, setLogger
public PostgreSQLDatabaseType()
public InputStream getBlob(ResultSet resultSet, String columnName) throws SQLException
SQLDatabaseType
getBlob
in interface SQLDatabaseType
getBlob
in class StaticSQLDatabaseType
resultSet
- the result set containing the blob.columnName
- columnSQLException
- if the columnLabel is not valid; if a database access error occurs or this method is called on a closed result setpublic InputStream getBlob(ResultSet resultSet, int pos) throws SQLException
SQLDatabaseType
getBlob
in interface SQLDatabaseType
getBlob
in class StaticSQLDatabaseType
resultSet
- the result set containing the blob.pos
- column positionSQLException
- if the columnLabel is not valid; if a database access error occurs or this method is called on a closed result setpublic void setBlob(PreparedStatement statement, int pos, String blob) throws SQLException, UnsupportedEncodingException
SQLDatabaseType
setBlob
in interface SQLDatabaseType
setBlob
in class StaticSQLDatabaseType
statement
- The satement where the blob will be setpos
- position in the statementblob
- String representing the blob. Can be nullSQLException
- if the columnLabel is not valid; if a database access error occurs or this method is called on a closed result setUnsupportedEncodingException
- if UTF-8 is not supportedpublic void setBlob(PreparedStatement statement, int pos, byte[] bytes) throws SQLException
SQLDatabaseType
SQLDatabaseType.setBlob(PreparedStatement, int, String)
setBlob
in interface SQLDatabaseType
setBlob
in class StaticSQLDatabaseType
statement
- The satement where the blob will be setpos
- position in the statementbytes
- byte[] representing the blob, in UTF-8. Can be nullSQLException
- if the columnLabel is not valid; if a database access error occurs or this method is called on a closed result setpublic void setBlob(PreparedStatement statement, int pos, InputStream is, long length) throws SQLException
SQLDatabaseType
SQLDatabaseType.setBlob(PreparedStatement, int, String)
setBlob
in interface SQLDatabaseType
setBlob
in class StaticSQLDatabaseType
statement
- The satement where the blob will be setpos
- position in the statementis
- inputStream to put in the blob. Can be nulllength
- length of the streamSQLException
- if the columnLabel is not valid; if a database access error occurs or this method is called on a closed result set