| Modifier and Type | Field and Description |
|---|---|
| private final AdaptiveFetchCache | |
| private final boolean | |
| private @Nullable String | applicationName
application_name connection property. |
| private final SimpleQuery | |
| private final SimpleQuery | |
| private final SimpleQuery | |
| private final boolean | |
| private final CommandCompleteParser | commandCompleteParser
|
| private short | |
| private final SimpleQuery | |
| private int | estimatedReceiveBufferBytes
The estimated server response size since we last consumed the input stream from the server, in bytes. |
| private boolean | integerDateTimes
True if server uses integers for date and time fields. |
| private @Nullable String | lastSetSearchPathQuery
This caches the latest observed |
| private @Nullable Object | lockedFor
Supplement to synchronization of public methods on current QueryExecutor. |
| private static final Logger | |
| private static final int | |
| private long | |
| private static final Field[] | |
| private static final int | |
| private final ReferenceQueue | |
| private final HashMap | |
| private final ReferenceQueue | |
| private final HashMap | |
| private final Deque | |
| private final Deque | |
| private final Deque | |
| private final Deque | |
| private final Deque | |
| pack-priv AtomicBoolean | |
| private final SimpleQuery | |
| private final ReplicationProtocol | |
| private final SimpleQuery | |
| private final SimpleQuery | sync
This is a fake query object so processResults can distinguish "ReadyForQuery" messages from Sync messages vs from simple execute (aka 'Q'). |
| private @Nullable TimeZone | timeZone
TimeZone of the current connection (TimeZone backend parameter). |
| private @Nullable SQLException | transactionFailCause
The exception that caused the last transaction to fail. |
| private static final Portal | |
| private final Set | useBinaryReceiveForOids
Bit set that has a bit set for each oid which should be received using binary format. |
| private final Set | useBinarySendForOids
Bit set that has a bit set for each oid which should be sent using binary format. |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public void | addBinaryReceiveOid(int
The oid to request with binary encoding. oid)Implements org. Adds a single oid that should be received using binary encoding. |
| public void | addBinarySendOid(int
The oid to send with binary encoding. oid)Implements org. 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)Implements org. Add query to adaptive fetch cache inside QueryExecutor. |
| public void | cancelCopy(CopyOperationImpl
the copy operation presumably currently holding lock on this connection op)Finishes a copy operation and unlocks connection discarding any exchanged data. |
| public ParameterList | createFastpathParameters(int
the number of parameters the fastpath call will take count)Implements org. Create a new ParameterList implementation suitable for invoking a fastpath function via
|
| public Query | createSimpleQuery(String
the SQL for the query to create sql)Implements org. Create an unparameterized Query object suitable for execution by this QueryExecutor. |
| public void | |
| public long | Returns: number of rows updated for server versions 8.2 or newerthe copy operation presumably currently holding lock on this connection op)Finishes writing to copy and unlocks connection. |
| public void | execute(Query query, @Nullable ParameterList parameters, ResultHandler handler, int maxRows, int fetchSize, int flags)
|
| public void | execute(Query query, @Nullable ParameterList parameters, ResultHandler handler, int maxRows, int fetchSize, int flags, boolean adaptiveFetch)
|
| public void | execute(Query[] queries, @Nullable ParameterList[] parameterLists, BatchResultHandler batchHandler, int maxRows, int fetchSize, int flags)
|
| public void | execute(Query[] queries, @Nullable ParameterList[] parameterLists, BatchResultHandler batchHandler, int maxRows, int fetchSize, int flags, boolean adaptiveFetch)
|
| public @Nullable byte[] | fastpathCall(int
the OID of the backend function to invoke fnid, ParameterList a ParameterList returned from parameters, boolean createFastpathParameters containing the
parameters to pass to the backend functionif begin should be suppressed suppressBegin)Implements org. 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)Implements org. Fetch additional rows from a cursor. |
| public void | |
| private void | flushIfDeadlockRisk(Query query, boolean disallowBatching, ResultHandler resultHandler, @Nullable BatchResultHandler batchHandler, final int flags)
|
| public boolean | getAdaptiveFetch()
Implements org. Get state of adaptive fetch inside QueryExecutor. |
| public int | getAdaptiveFetchSize(boolean
state 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)Implements org. Get fetch size computed by adaptive fetch size for given query. |
| public String | getApplicationName()
Implements org. Returns application_name connection property. |
| public Set | getBinaryReceiveOids()
Implements org. Gets the oids that should be received using binary encoding. |
| public Set | getBinarySendOids()
Implements org. Gets the oids that should be sent using binary encoding. |
| public boolean | getIntegerDateTimes()
Implements org. Returns true if server uses integer instead of double for binary date and time encodings. |
| public int | |
| public ReplicationProtocol | |
| public @Nullable TimeZone | getTimeZone()
Implements org. Returns backend timezone in java format. |
| private boolean | |
| pack-priv boolean | |
| private void | initCopy(CopyOperationImpl
an uninitialized CopyOperation op)Locks connection and calls initializer for a new CopyOperation Called via startCopy -> processCopyResults. |
| private void | |
| private void | |
| pack-priv @Nullable CopyOperationImpl | Returns: CopyIn when COPY FROM STDIN starts; CopyOut when COPY TO STDOUT starts; null when copy ends; otherwise, the operation given as parameter.whether to block waiting for input block)Handles copy sub protocol responses from server. |
| private void | |
| private void | |
| public void | processNotifies()
Implements org. Prior to attempting to retrieve notifications, we need to pull any recently received notifications off of the network buffers. |
| public void | processNotifies(int
when > 0, block for this time
when =0, block forever
when < 0, don't block timeoutMillis)Implements org. Prior to attempting to retrieve notifications, we need to pull any recently received notifications off of the network buffers. |
| protected void | |
| protected void | |
| pack-priv void | readFromCopy(CopyOperationImpl
the copy operation presumably currently holding lock on this connection op, boolean whether to block waiting for input block)Wait for a row of data to be received from server on an active copy operation Connection gets unlocked by processCopyResults() at end of operation. |
| public void | |
| private void | |
| private String | |
| private SQLException | |
| private @Nullable byte[] | |
| private Field[] | |
| private SQLWarning | |
| public void | |
| private void | |
| private void | |
| private void | |
| private void | |
| public void | removeBinaryReceiveOid(int
The oid to request with binary encoding. oid)Implements org. Remove given oid from the list of oids for binary receive encoding. |
| public void | removeBinarySendOid(int
The oid to send with binary encoding. oid)Implements org. 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)Implements org. Remove query from adaptive fetch cache inside QueryExecutor |
| private void | |
| private boolean | |
| private void | sendBind(SimpleQuery query, SimpleParameterList params, @Nullable Portal portal, boolean noBinaryTransfer)
|
| protected void | sendCloseMessage()
Implements abstract org. Sends "terminate connection" message to the backend. |
| private void | |
| private void | |
| private void | |
| private void | |
| private void | |
| private void | |
| private void | |
| private void | |
| private void | sendQuery(Query query, V3ParameterList parameters, int maxRows, int fetchSize, int flags, ResultHandler resultHandler, @Nullable BatchResultHandler batchHandler, boolean adaptiveFetch)
|
| private ResultHandler | |
| private void | |
| private void | |
| public void | setAdaptiveFetch(boolean
desired state of adaptive fetch adaptiveFetch)Implements org. Set state of adaptive fetch inside QueryExecutor. |
| public void | |
| public void | setBinaryReceiveOids(Set<Integer>
The oids to request with binary encoding. oids)Implements org. Sets the oids that should be received using binary encoding. |
| public void | setBinarySendOids(Set<Integer>
The oids to send with binary encoding. oids)Implements org. Sets the oids that should be sent using binary encoding. |
| private void | |
| private void | |
| public void | |
| private void | skipMessage()
Ignore the response message by reading the message length and skipping over those bytes in the communication stream. |
| public CopyOperation | Returns: CopyIn or CopyOut operation objectCOPY FROM STDIN / COPY TO STDOUT statement sql, boolean if begin should be suppressed suppressBegin)Implements org. Sends given query to BE to start, initialize and lock connection for a CopyOperation. |
| private void | |
| private int | |
| private boolean | |
| public boolean | useBinaryForReceive(int
type oid oid)Implements org. Returns if given oid should be received in binary format. |
| public boolean | useBinaryForSend(int
type oid oid)Implements org. Returns if given oid should be sent in binary format. |
| private void | |
| public Query | wrap(List<NativeQuery>
list of queries in native to database syntax queries)Implements org. Wrap given native query into a ready for execution format. |
| public void | writeToCopy(CopyOperationImpl
the CopyIn operation presumably currently holding lock on this connection op, byte[] bytes to send data, int index of first byte to send (usually 0) off, int number of bytes to send (usually data.length) siz)Sends data during a live COPY IN operation. |
| public void | writeToCopy(CopyOperationImpl
the CopyIn operation presumably currently holding lock on this connection op, ByteStreamWriter the source of bytes, e.g. a ByteBufferByteStreamWriter from)Sends data during a live COPY IN operation. |