Skip to content

Commit

Permalink
feat: Add cancelQuery() to PGConnection public interface
Browse files Browse the repository at this point in the history
Adds cancelQuery() to the extended public interface PGConnection to allow
for issueing of cancels directly to connections rather than having to keep
track of individual statements. The internals of the driver and the backend
server already operate at a connection level (not a statement level) and
this patch only exposes the existing cancelQuery() method publicly.
  • Loading branch information
sehrope committed Apr 6, 2019
1 parent 5e48c4d commit b8f1a2e
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions pgjdbc/src/main/java/org/postgresql/PGConnection.java
Expand Up @@ -182,6 +182,11 @@ public interface PGConnection {
*/
int getBackendPID();

/**
* Sends a query cancellation for this connection.
*/
void cancelQuery() throws SQLException;

/**
* Return the given string suitably quoted to be used as an identifier in an SQL statement string.
* Quotes are added only if necessary (i.e., if the string contains non-identifier characters or
Expand Down

0 comments on commit b8f1a2e

Please sign in to comment.