Abstracts the protocol-specific details of executing a query.
Every connection has a single QueryExecutor implementation associated with it. This object provides:
createSimpleQuery(String) and
createQuery(String, boolean, boolean, String...) )
execute(Query, ParameterList, ResultHandler, int, int, int) for single queries and
execute(Query[], ParameterList[], BatchResultHandler, int, int, int) for batches of queries)
createFastpathParameters and fastpathCall).
Query objects may represent a query that has parameter placeholders. To provide actual values for
these parameters, a ParameterList object is created via a factory method (
Query#createParameterList). The parameters are filled in by the caller and passed along
with the query to the query execution methods. Several ParameterLists for a given query might
exist at one time (or over time); this allows the underlying Query to be reused for several
executions, or for batch execution of the same Query.
In general, a Query created by a particular QueryExecutor may only be executed by that QueryExecutor, and a ParameterList created by a particular Query may only be used as parameters to that Query. Unpredictable things will happen if this isn't done.
| Modifier and Type | Field and Description |
|---|---|
| public static final int | |
| public static final int | QUERY_BOTH_ROWS_AND_STATUS
Flag for query execution used by generated keys where we want to receive both the ResultSet and associated update count from the command status. |
| public static final int | QUERY_DESCRIBE_ONLY
Flag for query execution when we don't really want to execute, we just want to get the parameter metadata for the statement. |
| public static final int | QUERY_DISALLOW_BATCHING
Deprecated
in PgJDBC 9.4 as we now auto-size batches.
Flag to disable batch execution when we expect results (generated keys) from a statement.
|
| public static final int | QUERY_EXECUTE_AS_SIMPLE
Execute the query via simple 'Q' command (not parse, bind, exec, but simple execute). |
| public static final int | QUERY_FORCE_DESCRIBE_PORTAL
Force this query to be described at each execution. |
| public static final int | QUERY_FORWARD_CURSOR
Flag for query execution that indicates a forward-fetch-capable cursor should be used if possible. |
| public static final int | QUERY_NO_BINARY_TRANSFER
Flag for query execution to avoid using binary transfer. |
| public static final int | QUERY_NO_METADATA
Flag for query execution that indicates that resultset metadata isn't needed and can be safely omitted. |
| public static final int | QUERY_NO_RESULTS
Flag for query execution that indicates that a resultset isn't expected and the query executor can safely discard any rows (although the resultset should still appear to be from a resultset-returning query). |
| public static final int | QUERY_ONESHOT
Flag for query execution that indicates the given Query object is unlikely to be reused. |
| public static final int | QUERY_READ_ONLY_HINT
Flag indicating that when beginning a transaction, it should be read only. |
| public static final int | QUERY_SUPPRESS_BEGIN
Flag for query execution that indicates the automatic BEGIN on the first statement when outside a transaction should not be done. |
| Modifier and Type | Method and Description |
|---|---|
| public void | |
| public void | addBinaryReceiveOid(int
The oid to request with binary encoding. oid)Adds a single oid that should be received using binary encoding. |
| public void | addBinarySendOid(int
The oid to send with binary encoding. oid)Adds a single oid that should be sent using binary encoding. |
| public void | addQueryToAdaptiveFetchCache(boolean
state of adaptive fetch used during adding query adaptiveFetch, ResultCursor Cursor used by resultSet, containing query, have to be able to cast to
Portal class. cursor)Add query to adaptive fetch cache inside QueryExecutor. |
| public CachedQuery | |
| public CachedQuery | |
| public CachedQuery | |
| public CachedQuery | |
| public void | |
| public ParameterList | Returns: a ParameterList suitable for passing tofastpathCall.the number of parameters the fastpath call will take count)
Deprecated
This API is somewhat obsolete, as one may achieve similar performance
and greater functionality by setting up a prepared statement to define
the function call.
Create a new ParameterList implementation suitable for invoking a fastpath function via
|
| public CachedQuery | createQuery(String sql, boolean escapeProcessing, boolean isParameterized, @Nullable String... columnNames)
|
| public CachedQuery | |
| public Object | createQueryKey(String sql, boolean escapeProcessing, boolean isParameterized, @Nullable String... columnNames)
|
| public Query | Returns: a new Query objectthe SQL for the query to create sql)Create an unparameterized Query object suitable for execution by this QueryExecutor. |
| public void | execute(Query
the query to execute; must be a query returned from calling
query, @Nullable ParameterList wrap(List) on this QueryExecutor object.the parameters for the query. Must be non- parameters, ResultHandler null if the query
takes parameters. Must be a parameter object returned by
org..a ResultHandler responsible for handling results generated by this query handler, int the maximum number of rows to retrieve maxRows, int if QUERY_FORWARD_CURSOR is set, the preferred number of rows to retrieve
before suspending fetchSize, int a combination of QUERY_* flags indicating how to handle the query. flags)Execute a Query, passing results to a provided ResultHandler. |
| public void | execute(Query
the query to execute; must be a query returned from calling
query, @Nullable ParameterList wrap(List) on this QueryExecutor object.the parameters for the query. Must be non- parameters, ResultHandler null if the query
takes parameters. Must be a parameter object returned by
org..a ResultHandler responsible for handling results generated by this query handler, int the maximum number of rows to retrieve maxRows, int if QUERY_FORWARD_CURSOR is set, the preferred number of rows to retrieve
before suspending fetchSize, int a combination of QUERY_* flags indicating how to handle the query. flags, boolean state of adaptiveFetch to use during execution adaptiveFetch)Execute a Query with adaptive fetch, passing results to a provided ResultHandler. |
| public void | execute(Query[]
the queries to execute; each must be a query returned from calling
queries, @Nullable ParameterList[] wrap(List) on this QueryExecutor object.the parameter lists for the queries. The parameter lists correspond 1:1
to the queries passed in the parameterLists, BatchResultHandler queries array. Each must be non-
null if the corresponding query takes parameters, and must be a parameter
object returned by Query#createParameterList() created by
the corresponding query.a ResultHandler responsible for handling results generated by this query handler, int the maximum number of rows to retrieve maxRows, int if QUERY_FORWARD_CURSOR is set, the preferred number of rows to retrieve
before suspending fetchSize, int a combination of QUERY_* flags indicating how to handle the query. flags)Execute several Query, passing results to a provided ResultHandler. |
| public void | execute(Query[]
the queries to execute; each must be a query returned from calling
queries, @Nullable ParameterList[] wrap(List) on this QueryExecutor object.the parameter lists for the queries. The parameter lists correspond 1:1
to the queries passed in the parameterLists, BatchResultHandler queries array. Each must be non-
null if the corresponding query takes parameters, and must be a parameter
object returned by Query#createParameterList() created by
the corresponding query.a ResultHandler responsible for handling results generated by this query handler, int the maximum number of rows to retrieve maxRows, int if QUERY_FORWARD_CURSOR is set, the preferred number of rows to retrieve
before suspending fetchSize, int a combination of QUERY_* flags indicating how to handle the query. flags, boolean state of adaptiveFetch to use during execution adaptiveFetch)Execute several Query with adaptive fetch, passing results to a provided ResultHandler. |
| public @Nullable byte[] | Returns: the binary-format result of the fastpath call, ornull if a void result
was returnedthe OID of the backend function to invoke fnid, ParameterList a ParameterList returned from params, boolean createFastpathParameters containing the
parameters to pass to the backend functionif begin should be suppressed suppressBegin)
Deprecated
This API is somewhat obsolete, as one may achieve similar performance
and greater functionality by setting up a prepared statement to define
the function call.
Invoke a backend function via the fastpath interface. |
| public void | fetch(ResultCursor
the cursor to fetch from cursor, ResultHandler the handler to feed results to handler, int the preferred number of rows to retrieve before suspending fetchSize, boolean state of adaptiveFetch to use during fetching adaptiveFetch)Fetch additional rows from a cursor. |
| public boolean | Returns: state of adaptive fetch inside QueryExecutorGet state of adaptive fetch inside QueryExecutor. |
| public int | Returns: fetch size computed by adaptive fetch size for given query passed inside cursorstate of adaptive fetch, which should be used during retrieving adaptiveFetch, ResultCursor Cursor used by resultSet, containing query, have to be able to cast to
Portal class. cursor)Get fetch size computed by adaptive fetch size for given query. |
| public String | Returns: application_name connection propertyReturns application_name connection property. |
| public AutoSave | |
| public int | Returns: process ID (PID) of the backend server process handling this connectionReturn the process ID (PID) of the backend server process handling this connection. |
| public Set | Returns: The oids to request with binary encoding.
Deprecated
the method returns a copy of the set, so it is not efficient. Use
useBinaryForReceive(int)
Gets the oids that should be received using binary encoding. |
| public Set | Returns: useBinaryForOids The oids to send with binary encoding.
Deprecated
the method returns a copy of the set, so it is not efficient. Use
useBinaryForSend(int)
Gets the oids that should be sent using binary encoding. |
| public Closeable | Returns: action that would close the connection cleanly.Returns an action that would close the connection cleanly. |
| public String | |
| public Encoding | |
| public EscapeSyntaxCallMode | |
| public HostSpec | |
| public boolean | Returns: the server integer_datetime setting.Returns true if server uses integer instead of double for binary date and time encodings. |
| public int | |
| public PGNotification[] | Returns: an array of notifications; if there are no notifications, an empty array is returned.Retrieve and clear the set of asynchronous notifications pending on this connection. |
| public @Nullable String | |
| public Map | |
| public PreferQueryMode | |
| public int | |
| public boolean | Returns: true if we are going to quote identifier provided in the returning array default is true
|
| public ReplicationProtocol | |
| public String | Returns: the server version string from the server_version GUCReturn the server version from the server_version GUC. |
| public int | Returns: the server version in numeric XXYYZZ form, eg 090401, from server_version_numGet a machine-readable server version. |
| public boolean | Returns: true if the server treats string literals according to the SQL standardReturns whether the server treats string-literals according to the SQL standard or if it uses traditional PostgreSQL escaping rules. |
| public @Nullable TimeZone | |
| public TransactionState | Returns: a ProtocolConnection.TRANSACTION_* constant.Get the current transaction state of this connection. |
| public String | |
| public @Nullable SQLWarning | Returns: the first SQLWarning in the chain; subsequent warnings can be found via SQLWarning.getNextWarning().Retrieve and clear the chain of warnings accumulated on this connection. |
| public boolean | |
| public boolean | |
| public boolean | |
| public void | processNotifies()
Prior to attempting to retrieve notifications, we need to pull any recently received notifications off of the network buffers. |
| public void | processNotifies(int
number of milliseconds to block for timeoutMillis)Prior to attempting to retrieve notifications, we need to pull any recently received notifications off of the network buffers. |
| public void | |
| public void | removeBinaryReceiveOid(int
The oid to request with binary encoding. oid)Remove given oid from the list of oids for binary receive encoding. |
| public void | removeBinarySendOid(int
The oid to send with binary encoding. oid)Remove given oid from the list of oids for binary send encoding. |
| public void | removeQueryFromAdaptiveFetchCache(boolean
state of adaptive fetch used during removing query adaptiveFetch, ResultCursor Cursor used by resultSet, containing query, have to be able to cast to
Portal class. cursor)Remove query from adaptive fetch cache inside QueryExecutor |
| public void | |
| public void | setAdaptiveFetch(boolean
desired state of adaptive fetch adaptiveFetch)Set state of adaptive fetch inside QueryExecutor. |
| public void | |
| public void | setBinaryReceiveOids(Set<Integer>
The oids to request with binary encoding. useBinaryForOids)Sets the oids that should be received using binary encoding. |
| public void | setBinarySendOids(Set<Integer>
The oids to send with binary encoding. useBinaryForOids)Sets the oids that should be sent using binary encoding. |
| public void | setFlushCacheOnDeallocate(boolean
true if statement cache should be reset when "deallocate/discard" message observed flushCacheOnDeallocate)By default, the connection resets statement cache in case deallocate all/discard all message is observed. |
| public void | |
| public void | |
| public CopyOperation | |
| public boolean | |
| public Query | Returns: query object ready for execution by this query executorlist of queries in native to database syntax queries)Wrap given native query into a ready for execution format. |
| MAX_SAVE_POINTS | back to summary |
|---|---|
| public static final int MAX_SAVE_POINTS | |
| QUERY_BOTH_ROWS_AND_STATUS | back to summary |
|---|---|
| public static final int QUERY_BOTH_ROWS_AND_STATUS Flag for query execution used by generated keys where we want to receive both the ResultSet and associated update count from the command status. | |
| QUERY_DESCRIBE_ONLY | back to summary |
|---|---|
| public static final int QUERY_DESCRIBE_ONLY Flag for query execution when we don't really want to execute, we just want to get the parameter metadata for the statement. | |
| QUERY_DISALLOW_BATCHING | back to summary |
|---|---|
| public static final int QUERY_DISALLOW_BATCHING
Deprecated in PgJDBC 9.4 as we now auto-size batches. Flag to disable batch execution when we expect results (generated keys) from a statement. | |
| QUERY_EXECUTE_AS_SIMPLE | back to summary |
|---|---|
| public static final int QUERY_EXECUTE_AS_SIMPLE Execute the query via simple 'Q' command (not parse, bind, exec, but simple execute). This sends query text on each execution, however it supports sending multiple queries separated with ';' as a single command. | |
| QUERY_FORCE_DESCRIBE_PORTAL | back to summary |
|---|---|
| public static final int QUERY_FORCE_DESCRIBE_PORTAL Force this query to be described at each execution. This is done in pipelined batches where we might need to detect mismatched result types. | |
| QUERY_FORWARD_CURSOR | back to summary |
|---|---|
| public static final int QUERY_FORWARD_CURSOR Flag for query execution that indicates a forward-fetch-capable cursor should be used if possible. | |
| QUERY_NO_BINARY_TRANSFER | back to summary |
|---|---|
| public static final int QUERY_NO_BINARY_TRANSFER Flag for query execution to avoid using binary transfer. | |
| QUERY_NO_METADATA | back to summary |
|---|---|
| public static final int QUERY_NO_METADATA Flag for query execution that indicates that resultset metadata isn't needed and can be safely omitted. | |
| QUERY_NO_RESULTS | back to summary |
|---|---|
| public static final int QUERY_NO_RESULTS Flag for query execution that indicates that a resultset isn't expected and the query executor can safely discard any rows (although the resultset should still appear to be from a resultset-returning query). | |
| QUERY_ONESHOT | back to summary |
|---|---|
| public static final int QUERY_ONESHOT Flag for query execution that indicates the given Query object is unlikely to be reused. | |
| QUERY_READ_ONLY_HINT | back to summary |
|---|---|
| public static final int QUERY_READ_ONLY_HINT Flag indicating that when beginning a transaction, it should be read only. | |
| QUERY_SUPPRESS_BEGIN | back to summary |
|---|---|
| public static final int QUERY_SUPPRESS_BEGIN Flag for query execution that indicates the automatic BEGIN on the first statement when outside a transaction should not be done. | |
| abort | back to summary |
|---|---|
| public void abort() Abort at network level without sending the Terminate message to the backend. | |
| addBinaryReceiveOid | back to summary |
|---|---|
| public void addBinaryReceiveOid(int oid) Adds a single oid that should be received using binary encoding.
| |
| addBinarySendOid | back to summary |
|---|---|
| public void addBinarySendOid(int oid) Adds a single oid that should be sent using binary encoding.
| |
| addQueryToAdaptiveFetchCache | back to summary |
|---|---|
| public void addQueryToAdaptiveFetchCache(boolean adaptiveFetch, ResultCursor cursor) Add query to adaptive fetch cache inside QueryExecutor.
| |
| borrowCallableQuery | back to summary |
|---|---|
| public CachedQuery borrowCallableQuery(String sql) throws SQLException | |
| borrowQuery | back to summary |
|---|---|
| public CachedQuery borrowQuery(String sql) throws SQLException | |
| borrowQueryByKey | back to summary |
|---|---|
| public CachedQuery borrowQueryByKey(Object key) throws SQLException | |
| borrowReturningQuery | back to summary |
|---|---|
| public CachedQuery borrowReturningQuery(String sql, @Nullable String[] columnNames) throws SQLException | |
| close | back to summary |
|---|---|
| public void close() Close this connection cleanly. | |
| createFastpathParameters | back to summary |
|---|---|
| public ParameterList createFastpathParameters(int count)
Deprecated This API is somewhat obsolete, as one may achieve similar performance and greater functionality by setting up a prepared statement to define the function call. Then, executing the statement with binary transmission of parameters and results substitutes for a fast-path function call. Create a new ParameterList implementation suitable for invoking a fastpath function via
| |
| createQuery | back to summary |
|---|---|
| public CachedQuery createQuery(String sql, boolean escapeProcessing, boolean isParameterized, @Nullable String... columnNames) throws SQLException | |
| createQueryByKey | back to summary |
|---|---|
| public CachedQuery createQueryByKey(Object key) throws SQLException | |
| createQueryKey | back to summary |
|---|---|
| public Object createQueryKey(String sql, boolean escapeProcessing, boolean isParameterized, @Nullable String... columnNames) | |
| createSimpleQuery | back to summary |
|---|---|
| public Query createSimpleQuery(String sql) throws SQLException Create an unparameterized Query object suitable for execution by this QueryExecutor. The
provided query string is not parsed for parameter placeholders ('?' characters), and the
| |
| execute | back to summary |
|---|---|
| public void execute(Query query, @Nullable ParameterList parameters, ResultHandler handler, int maxRows, int fetchSize, int flags) throws SQLException Execute a Query, passing results to a provided ResultHandler.
| |
| execute | back to summary |
|---|---|
| public void execute(Query query, @Nullable ParameterList parameters, ResultHandler handler, int maxRows, int fetchSize, int flags, boolean adaptiveFetch) throws SQLException Execute a Query with adaptive fetch, passing results to a provided ResultHandler.
| |
| execute | back to summary |
|---|---|
| public void execute(Query[] queries, @Nullable ParameterList[] parameterLists, BatchResultHandler handler, int maxRows, int fetchSize, int flags) throws SQLException Execute several Query, passing results to a provided ResultHandler.
| |
| execute | back to summary |
|---|---|
| public void execute(Query[] queries, @Nullable ParameterList[] parameterLists, BatchResultHandler handler, int maxRows, int fetchSize, int flags, boolean adaptiveFetch) throws SQLException Execute several Query with adaptive fetch, passing results to a provided ResultHandler.
| |
| fastpathCall | back to summary |
|---|---|
| public @Nullable byte[] fastpathCall(int fnid, ParameterList params, boolean suppressBegin) throws SQLException
Deprecated This API is somewhat obsolete, as one may achieve similar performance and greater functionality by setting up a prepared statement to define the function call. Then, executing the statement with binary transmission of parameters and results substitutes for a fast-path function call. Invoke a backend function via the fastpath interface.
| |
| fetch | back to summary |
|---|---|
| public void fetch(ResultCursor cursor, ResultHandler handler, int fetchSize, boolean adaptiveFetch) throws SQLException Fetch additional rows from a cursor.
| |
| getAdaptiveFetch | back to summary |
|---|---|
| public boolean getAdaptiveFetch() Get state of adaptive fetch inside QueryExecutor.
| |
| getAdaptiveFetchSize | back to summary |
|---|---|
| public int getAdaptiveFetchSize(boolean adaptiveFetch, ResultCursor cursor) Get fetch size computed by adaptive fetch size for given query.
| |
| getApplicationName | back to summary |
|---|---|
| public String getApplicationName() Returns application_name connection property.
| |
| getAutoSave | back to summary |
|---|---|
| public AutoSave getAutoSave() | |
| getBackendPID | back to summary |
|---|---|
| public int getBackendPID() Return the process ID (PID) of the backend server process handling this connection.
| |
| getBinaryReceiveOids | back to summary |
|---|---|
| public Set Deprecated the method returns a copy of the set, so it is not efficient. Use Gets the oids that should be received using binary encoding. Note this returns an unmodifiable set, and its contents might not reflect the current state. | |
| getBinarySendOids | back to summary |
|---|---|
| public Set Deprecated the method returns a copy of the set, so it is not efficient. Use Gets the oids that should be sent using binary encoding. Note this returns an unmodifiable set, and its contents might not reflect the current state. | |
| getCloseAction | back to summary |
|---|---|
| public Closeable getCloseAction() Returns an action that would close the connection cleanly.
The returned object should refer only the minimum subset of objects required
for proper resource cleanup. For instance, it should better not hold a strong reference to
| |
| getDatabase | back to summary |
|---|---|
public String getDatabase()
| |
| getEncoding | back to summary |
|---|---|
public Encoding getEncoding()
| |
| getEscapeSyntaxCallMode | back to summary |
|---|---|
| public EscapeSyntaxCallMode getEscapeSyntaxCallMode() | |
| getHostSpec | back to summary |
|---|---|
public HostSpec getHostSpec()
| |
| getIntegerDateTimes | back to summary |
|---|---|
| public boolean getIntegerDateTimes() Returns true if server uses integer instead of double for binary date and time encodings.
| |
| getNetworkTimeout | back to summary |
|---|---|
| public int getNetworkTimeout() throws IOException | |
| getNotifications | back to summary |
|---|---|
| public PGNotification[] getNotifications() throws SQLException Retrieve and clear the set of asynchronous notifications pending on this connection.
| |
| getParameterStatus | back to summary |
|---|---|
| public @Nullable String getParameterStatus(String parameterName) | |
| getParameterStatuses | back to summary |
|---|---|
| public Map | |
| getPreferQueryMode | back to summary |
|---|---|
| public PreferQueryMode getPreferQueryMode() | |
| getProtocolVersion | back to summary |
|---|---|
public int getProtocolVersion()
| |
| getQuoteReturningIdentifiers | back to summary |
|---|---|
public boolean getQuoteReturningIdentifiers()
| |
| getReplicationProtocol | back to summary |
|---|---|
public ReplicationProtocol getReplicationProtocol()
| |
| getServerVersion | back to summary |
|---|---|
| public String getServerVersion() Return the server version from the server_version GUC. Note that there's no requirement for this to be numeric or of the form x.y.z. PostgreSQL development releases usually have the format x.ydevel e.g. 9.4devel; betas usually x.ybetan e.g. 9.4beta1. The --with-extra-version configure option may add an arbitrary string to this. Don't use this string for logic, only use it when displaying the server version to the user. Prefer getServerVersionNum() for all logic purposes.
| |
| getServerVersionNum | back to summary |
|---|---|
| public int getServerVersionNum() Get a machine-readable server version. This returns the value of the server_version_num GUC. If no such GUC exists, it falls back on attempting to parse the text server version for the major version. If there's no minor version (e.g. a devel or beta release) then the minor version is set to zero. If the version could not be parsed, zero is returned.
| |
| getStandardConformingStrings | back to summary |
|---|---|
| public boolean getStandardConformingStrings() Returns whether the server treats string-literals according to the SQL standard or if it uses
traditional PostgreSQL escaping rules. Versions up to 8.1 always treated backslashes as escape
characters in string-literals. Since 8.2, this depends on the value of the
| |
| getTimeZone | back to summary |
|---|---|
| public @Nullable TimeZone getTimeZone() Returns backend timezone in java format. | |
| getTransactionState | back to summary |
|---|---|
| public TransactionState getTransactionState() Get the current transaction state of this connection.
| |
| getUser | back to summary |
|---|---|
public String getUser()
| |
| getWarnings | back to summary |
|---|---|
| public @Nullable SQLWarning getWarnings() Retrieve and clear the chain of warnings accumulated on this connection.
| |
| isClosed | back to summary |
|---|---|
| public boolean isClosed() Check if this connection is closed.
| |
| isColumnSanitiserDisabled | back to summary |
|---|---|
| public boolean isColumnSanitiserDisabled() | |
| isReWriteBatchedInsertsEnabled | back to summary |
|---|---|
| public boolean isReWriteBatchedInsertsEnabled() | |
| processNotifies | back to summary |
|---|---|
| public void processNotifies() throws SQLException Prior to attempting to retrieve notifications, we need to pull any recently received notifications off of the network buffers. The notification retrieval in ProtocolConnection cannot do this as it is prone to deadlock, so the higher level caller must be responsible which requires exposing this method.
| |
| processNotifies | back to summary |
|---|---|
| public void processNotifies(int timeoutMillis) throws SQLException Prior to attempting to retrieve notifications, we need to pull any recently received notifications off of the network buffers. The notification retrieval in ProtocolConnection cannot do this as it is prone to deadlock, so the higher level caller must be responsible which requires exposing this method. This variant supports blocking for the given time in millis.
| |
| releaseQuery | back to summary |
|---|---|
| public void releaseQuery(CachedQuery cachedQuery) | |
| removeBinaryReceiveOid | back to summary |
|---|---|
| public void removeBinaryReceiveOid(int oid) Remove given oid from the list of oids for binary receive encoding. Note the binary receive for the oid can be re-activated later.
| |
| removeBinarySendOid | back to summary |
|---|---|
| public void removeBinarySendOid(int oid) Remove given oid from the list of oids for binary send encoding. Note the binary send for the oid can be re-activated later.
| |
| removeQueryFromAdaptiveFetchCache | back to summary |
|---|---|
| public void removeQueryFromAdaptiveFetchCache(boolean adaptiveFetch, ResultCursor cursor) Remove query from adaptive fetch cache inside QueryExecutor
| |
| sendQueryCancel | back to summary |
|---|---|
| public void sendQueryCancel() throws SQLException Sends a query cancellation for this connection.
| |
| setAdaptiveFetch | back to summary |
|---|---|
| public void setAdaptiveFetch(boolean adaptiveFetch) Set state of adaptive fetch inside QueryExecutor.
| |
| setAutoSave | back to summary |
|---|---|
| public void setAutoSave(AutoSave autoSave) | |
| setBinaryReceiveOids | back to summary |
|---|---|
| public void setBinaryReceiveOids(Set<Integer> useBinaryForOids) Sets the oids that should be received using binary encoding. | |
| setBinarySendOids | back to summary |
|---|---|
| public void setBinarySendOids(Set<Integer> useBinaryForOids) Sets the oids that should be sent using binary encoding. | |
| setFlushCacheOnDeallocate | back to summary |
|---|---|
| public void setFlushCacheOnDeallocate(boolean flushCacheOnDeallocate) By default, the connection resets statement cache in case deallocate all/discard all message is observed. This API allows to disable that feature for testing purposes.
| |
| setNetworkTimeout | back to summary |
|---|---|
| public void setNetworkTimeout(int milliseconds) throws IOException | |
| setPreferQueryMode | back to summary |
|---|---|
| public void setPreferQueryMode(PreferQueryMode mode) | |
| startCopy | back to summary |
|---|---|
| public CopyOperation startCopy(String sql, boolean suppressBegin) throws SQLException Issues a COPY FROM STDIN / COPY TO STDOUT statement and returns handler for associated operation. Until the copy operation completes, no other database operation may be performed. Implemented for protocol version 3 only.
| |
| willHealOnRetry | back to summary |
|---|---|
| public boolean willHealOnRetry(SQLException e) | |
| wrap | back to summary |
|---|---|
| public Query wrap(List<NativeQuery> queries) Wrap given native query into a ready for execution format.
| |