Query Inspection
See original GitHub issueHi,
Is there a proper way to inspect query before execution? I want to get table name and joined table names of the query.
var query = knex.select('*').from('ua_entity').innerJoin('ua_field', 'ua_field.entity_id', 'ua_entity.id');
I can use non-public attributes. However this is of course inappropriate.
var table = query._single.table;
var joinedTable = query._statements[1].table; // Or by iteration of _statements
If there isn’t any public attribute/function for inspection, could you please add that feature at least for getting table names and column names of the query?
Thank you.
Issue Analytics
- State:
- Created 9 years ago
- Comments:5 (3 by maintainers)
Top Results From Across the Web
Query inspection - Tinkerwell
Query inspection #. Tinkerwell allows you to inspect any code snippet and see all of the underlying Eloquent queries that were executed in...
Read more >Physical Inspections Query Page - HUD
Welcome to the public HUD property physical inspections query page. ... access to the scheduling activities of physical inspections for HUD-held properties.
Read more >Code Inspections in SQL | PhpStorm Documentation - JetBrains
In USING clauses, a column name must be present in both tables, and the SELECT query will automatically join those tables by using...
Read more >How To Use Grafana's Query Inspector to troubleshoot issues
Query Inspector is a new feature that was added to Grafana v4.5. It shows query requests and responses. This can be helpful if...
Read more >Get query performance insights | BigQuery - Google Cloud
Describes how to use the query execution graph to diagnose query performance issues, and to see query performance insights.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Yes this is the main focus of an internal overhaul coming soon.
Everything will be extremely easy to inspect, essentially every piece of the query builder will be accessible as an es6 iterator. Hang tight 😃
@tgriesser Did that internal overhaul happen?