public interface PGConnection extends Connection
TRANSACTION_NONE, TRANSACTION_READ_COMMITTED, TRANSACTION_READ_UNCOMMITTED, TRANSACTION_REPEATABLE_READ, TRANSACTION_SERIALIZABLE
Modifier and Type | Method and Description |
---|---|
void |
addNotificationListener(PGNotificationListener listener)
Adds an, unnamed, unfiltered, asynchronous notification listener to this
connection
|
void |
addNotificationListener(String channelNameFilter,
PGNotificationListener listener)
Adds an, unnamed, filtered, asynchronous notification listener to this
connection
|
void |
addNotificationListener(String name,
String channelNameFilter,
PGNotificationListener listener)
Adds a filtered asynchronous notification listener to this connection
|
void |
copyFrom(String sql,
InputStream inputStream)
Allows issuing PostgreSQL's COPY command providing an
InputStream
stream to read from, instead of relying on System.in . |
void |
copyTo(String sql,
OutputStream outputStream)
Allows issuing PostgreSQL's COPY command providing an
OutputStream
stream to write to, instead of relying on System.out . |
Integer |
getDefaultFetchSize()
Get the default fetch size
|
boolean |
isServerMinimumVersion(int major,
int minor)
Checks the minimum server version
|
boolean |
isStrictMode()
Is strict mode
|
void |
removeNotificationListener(PGNotificationListener listener)
Removes a notification listener
|
void |
removeNotificationListener(String name)
Removes a named notification listener
|
PGAnyType |
resolveType(String name)
Resolves a name to an SQLType suitable for passing
to any method that accepts one.
|
void |
setDefaultFetchSize(Integer v)
Set the default fetch size
|
void |
setStrictMode(boolean v)
Set strict mode
|
abort, clearWarnings, close, commit, createArrayOf, createBlob, createClob, createNClob, createSQLXML, createStatement, createStatement, createStatement, createStruct, getAutoCommit, getCatalog, getClientInfo, getClientInfo, getHoldability, getMetaData, getNetworkTimeout, getSchema, getTransactionIsolation, getTypeMap, getWarnings, isClosed, isReadOnly, isValid, nativeSQL, prepareCall, prepareCall, prepareCall, prepareStatement, prepareStatement, prepareStatement, prepareStatement, prepareStatement, prepareStatement, releaseSavepoint, rollback, rollback, setAutoCommit, setCatalog, setClientInfo, setClientInfo, setHoldability, setNetworkTimeout, setReadOnly, setSavepoint, setSavepoint, setSchema, setTransactionIsolation, setTypeMap
isWrapperFor, unwrap
boolean isServerMinimumVersion(int major, int minor)
major
- The major releaseminor
- The minor releaseTrue
if the server is minimum the specified version, otherwise false
.void addNotificationListener(String name, String channelNameFilter, PGNotificationListener listener)
name
- Name of listenerchannelNameFilter
- Channel name based notification filter (Regular Expression)listener
- Notification listenervoid addNotificationListener(String channelNameFilter, PGNotificationListener listener)
channelNameFilter
- Channel name based notification filter (Regular Expression)listener
- Notification listenervoid addNotificationListener(PGNotificationListener listener)
listener
- Notification listenervoid removeNotificationListener(String name)
name
- Name of listener to removevoid removeNotificationListener(PGNotificationListener listener)
listener
- Listener instance to removevoid setStrictMode(boolean v)
v
- The valueboolean isStrictMode()
void setDefaultFetchSize(Integer v)
v
- The valueInteger getDefaultFetchSize()
PGAnyType resolveType(String name) throws SQLException
name
- Name of type to resolve (anything acceptable to the server)SQLException
void copyFrom(String sql, InputStream inputStream) throws SQLException
InputStream
stream to read from, instead of relying on System.in
.sql
- SQL text for a valid COPY ... FROM STDIN
command.inputStream
- InputStream
containing data in COPY
format.SQLException
- If an error occurs during the copy operation or if an alternate command is provided.void copyTo(String sql, OutputStream outputStream) throws SQLException
OutputStream
stream to write to, instead of relying on System.out
.sql
- SQL text for a valid COPY ... TO STDOUT
command.outputStream
- OutputStream
to write data in COPY
format.SQLException
- If an error occurs during the copy operation or if an alternate command is provided.