sqlparse
sqlparse copied to clipboard
A non-validating SQL parser module for Python
``` import sqlparse rawsql=""" UNLOAD ( $$ WITH evt_tmp AS ( SELECT col1, col2, col3 FROM emp e WHERE emp_id = 123 AND job_id is not null -- AND job_role_id...
Added grouping for having class similar to where class. It will be helpful because a HAVING clause can contain multiple conditions. Also adding code in sql.py
- Added Google Bigquery Standard SQL keywords - I picked up function's categories below. - Type keywords - Aggregate functions - Statistical aggregate functions - Mathematical Functions - Navigation Functions...
`SELECT ARRAY[1]
added a couple of new key words
Hello, i try to extract table name from this pgbench testing query ```sql UPDATE pgbench_tellers SET tbalance = tbalance + $1 WHERE tid = $2 ``` Someone knows how to...
The [regex](https://github.com/andialbrecht/sqlparse/blob/master/sqlparse/keywords.py#L69) for determining a `tokens.String.Single` seems incorrect, i.e., it is too greedy, when the SQL contains an escape character: ```python >>> from sqlparse import parse >>> stmt = parse(r"foo...
I am using Atom on my Windows Laptop. I found every time I do a formatting, sqlformatter replaces my pre-set LF line ending to CRLF which is the platform default.
I have this sql file: ``` CREATE TABLE `fehlermeldung` ( `fehlermeldung-id` int(10) UNSIGNED NOT NULL, `datum` date NOT NULL, `beschreibung` text COLLATE utf8mb4_unicode_ci NOT NULL, `melder` int(11) UNSIGNED NOT NULL,...