I'm using QSqlDatabase and am trying to find a way to kill a running query (kind of a necessary feature of the sql client I'm writing)
Is there a way to get the id for a running query? (the plan is to just execute a kill/pg_cancel_backend command in another connection -- needs to support PostgreSQL + MySQL)
I've considered snooping the process list for an identical query, but what if the reason it's being terminated is because it's running twice and the user just wants to kill a specific one? (that would make that method not exactly accurate and also would be super hacky)
Edit: I'm not super tied to QSqlDatabase (other than that it's part of the framework I'm using) so I don't mind using something else if it's the only way, but it sure would be nice to be able to use it.
I have absolutely no ideas, so anything would be super appreciated!