sqlparse
sqlparse copied to clipboard
A non-validating SQL parser module for Python
Is this project still being maintained? There are 172 open issues, 18 PRs and the last commit was in Dec 2020 :(
I would like to create my own alternate to `ReindentFilter` and `AlignedIndentFilter`. I played around a bit with subclassing `AlignedIndentFilter` and making changes, but am now stuck. Is there any...
consider parsing a simple SET statement: ```python sqlparse.parse("SET fsync=true;")[0].tokens ``` the result is: ```python [, , , , , , ] ```` the comparison clause is not parsed correctly comparing...
Fix #628 Consider backtick `` ` ``as a quote character and remove it in utils.removte_quotes()
Should back tick `` ` `` considered to be a quote character ? For example `` `test_schema` `` when passed to remove_quotes() should return schema name without the backtick. [https://github.com/andialbrecht/sqlparse/blob/23d29933ddc4272b495d36e0e32d3eaf0c3ef76d/sqlparse/utils.py#L58](https://github.com/andialbrecht/sqlparse/blob/23d29933ddc4272b495d36e0e32d3eaf0c3ef76d/sqlparse/utils.py#L58)...
Would it be alright if I created a PR to add keywords for Impala SQL? Here is the list of Impala SQL keywords: https://impala.apache.org/docs/build/html/topics/impala_reserved_words.html
Using version 0.3.0 In a query such as this: `SELECT 'fixed_text' ALIAS1 FROM .......` The tokens generated are: Token (ttype=Token.Literal.String.Single) = 'fixed_text' Identifier = ALIAS1 The expected tokens are: 1...
version: 0.4.1 here is my example: ```sql select `user` as id , name 'test', mo ttt from mysql.user ``` then i use sqlparse.parse(sql)[0], here is the printed tree: ```yaml 0...
`sqlparse` doesn't get queries with `EXISTS` on the first position quite well. This is valid syntax for, e.g., Clickhouse: https://clickhouse.tech/docs/en/sql-reference/statements/exists/ This is the reason for bug https://github.com/maximdanilchenko/aiochclient/issues/50 , because [code](https://github.com/maximdanilchenko/aiochclient/blob/5954094aecc63870f276fbcec429e1d8efd869c3/aiochclient/client.py#L382)...
I'll leave this example here which should illustrate the problem: ```python import sqlparse stmt = """ SELECT max(sub.game_name) AS name , max(sub.game_desc) AS desc , max(CASE WHEN sub.rank_asc = 1...