Skip to content

Commit

Permalink
feat: Add cancelQuery() to PGConnection public interface (#1157)
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 authored and davecramer committed Nov 27, 2019
1 parent fdf898c commit f0af538
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 @@ -184,6 +184,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 f0af538

Please sign in to comment.