-
Notifications
You must be signed in to change notification settings - Fork 83
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
CTE names are included in tables list #52
Comments
@jcoleman Thats a good question - the intent here was probably to get actual relations (i.e. tables/views), rather than CTEs. Maybe the best way would be to change the PR would be very welcome :) |
Actually, if you are feeling motivated on this topic - it might be nice to traverse into nested SELECTs as well, i.e. fix #38 Alternatively I'll do that as a follow-up PR, about time that that issue gets fixed. |
That fixes it for me. Side note: I had to update bundler to 1.12.5 to be able to use the gem by referencing a git ref...apparently there were issues with git ref + native extensions prior to that: rubygems/bundler#4106 |
Currently the following query:
parses and
#tables
returns["cte_name", "table_name"]
.I propose either:
#tables
should return["table_name"]
only, or#tables
should remain as is and a new method#cte_names
should return the list of CTE aliasesWould you be interested in a PR with one of the above solutions?
The text was updated successfully, but these errors were encountered: