Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Add cancelQuery() to PGConnection public interface #1157

Merged
merged 1 commit into from Nov 27, 2019

Conversation

sehrope
Copy link
Member

@sehrope sehrope commented Mar 28, 2018

Adds cancelQuery() to the extended public interface PGConnection to allow for issuing 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.

Exposing the cancelQuery() publicly is mainly a convenience thing as it's already part of all the concrete implementations. This is how how the server handles cancellation (i.e. at the connection, not statement, level) so I don't foresee any long term baggage associated with exposing this. The backend functionality is not going away.

There's been at least one other request for this in the past: #1084

Any thoughts on merging this in?

@codecov-io
Copy link

@codecov-io codecov-io commented Mar 28, 2018

Codecov Report

Merging #1157 into master will decrease coverage by 0.01%.
The diff coverage is n/a.

@@             Coverage Diff              @@
##             master    #1157      +/-   ##
============================================
- Coverage     68.94%   68.93%   -0.02%     
+ Complexity     3775     3774       -1     
============================================
  Files           170      170              
  Lines         15757    15757              
  Branches       2577     2577              
============================================
- Hits          10864    10862       -2     
- Misses         3658     3659       +1     
- Partials       1235     1236       +1

@sehrope sehrope force-pushed the add-cancel-query-to-pgconnection branch from 929ad71 to 8d7b7a0 Compare Jan 14, 2019
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.
@sehrope sehrope force-pushed the add-cancel-query-to-pgconnection branch from 8d7b7a0 to b8f1a2e Compare Apr 6, 2019
@AppVeyorBot
Copy link

@AppVeyorBot AppVeyorBot commented Apr 6, 2019

Build pgjdbc 1.0.201 completed (commit db109455e3 by @sehrope)

@davecramer davecramer merged commit f0af538 into pgjdbc:master Nov 27, 2019
1 of 2 checks passed
davecramer pushed a commit to davecramer/pgjdbc that referenced this issue Jul 5, 2021
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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants