We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Calling get_type() on a SQL query that uses a CTE (WITH ... SELECT ...) returns UNKNOWN instead of SELECT. Test case:
get_type()
WITH ... SELECT ...
UNKNOWN
SELECT
import sqlparse select_stmt = sqlparse.parse('SELECT 1, 2, 3 FROM foo;')[0] assert select_stmt.get_type() == 'SELECT' with_stmt = sqlparse.parse('WITH foo AS (SELECT 1, 2, 3) SELECT * FROM foo;')[0] assert with_stmt.get_type() == 'SELECT' # returns 'UNKNOWN'
The text was updated successfully, but these errors were encountered:
(This issue is present in both 0.1.18 and master.)
Sorry, something went wrong.
Add failing test for issue andialbrecht#227.
d8e8f30
Merge pull request #228 from compareasiagroup/master
8f39d33
Fix for #227 (get_type() doesn't work for queries that use WITH)
Fixed in 8f39d33
No branches or pull requests
Calling
get_type()
on a SQL query that uses a CTE (WITH ... SELECT ...
) returnsUNKNOWN
instead ofSELECT
. Test case:The text was updated successfully, but these errors were encountered: