Repository navigation
Conversation
landsman
force-pushed
the
after-query-hook
branch
from
October 24, 2026 22:28
1aca907 to
5124b83
Compare
Owner
|
I solved it in a more general way and for all drivers. |
Contributor
Author
|
Thank you! |
6 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Add an
afterQuery()hook, called after every query a driver sends, with the query, its time in seconds and the result. It lets a plugin profile what Adminer runs — e.g. feed a debug bar's SQL panel — which no existing hook reaches:messageQuery()andsqlCommandQuery()see only the queries the user is shown.query_done()calls the hook and returns the result, so each driver'squery()wraps its return values. Covered: MySQLi (query()andmulti_query()overridden, since it inherits them from\mysqli), PgSQL, SQLite3 andPdoDb, which the PDO drivers go through. Queries sent before the plugins are loaded are skipped. MS SQL, Oracle and the plugin drivers are not covered yet — happy to add them if the shape is right.