summaryrefslogtreecommitdiff
path: root/sqlparse
Commit message (Collapse)AuthorAgeFilesLines
* Make tzcast grouping function less eagerErik Cederstrand2022-08-161-2/+9
|
* Add regex pattern to identify REGEXP as a Compasion tokenJavierPan2022-08-081-0/+1
|
* Refactor to reduce redundant code.Daniel Harding2022-08-081-10/+7
|
* Don't make slice copies in TokenList._token_matching().Daniel Harding2022-08-081-1/+4
| | | | | | | | | | | | | | Since we are working with indexes anyway, don't bother calling enumerate() with a slice from self.tokens (which requires copying memory). Instead, just generate the indexes using range() and use normal indexing to access the desired tokens. The old behavior resulted in quadratic runtime with respect to the number of tokens, which significantly impacted performance for statements with very large numbers of tokens. With the new behavior, the runtime is now linear with respect to the number of tokens.
* added some builtin types that can appear in Spark create table statements.Simon Heisterkamp2022-08-081-0/+4
|
* DIV is OperatorAki Ariga2022-08-081-0/+1
|
* Fix INDICATOR keywordosmnv2022-08-071-1/+1
|
* Switch back to development mode.Andi Albrecht2021-09-101-1/+1
|
* Update Changelog and bump version.Andi Albrecht2021-09-101-1/+1
|
* Optimize regular expression for identifying line breaks in comments.Andi Albrecht2021-09-101-1/+4
|
* Fix parsing of scientific numbers (fixes #399).Andi Albrecht2021-07-141-1/+1
|
* keyword, add ON_ERROR_STOPJean-Martin Archer2020-12-121-0/+1
|
* keyword, add CONFLICT to postgres keywordsJean-Martin Archer2020-12-121-0/+1
| | | | As in ON CONFLICT
* Add ELSIF as keyword (fixes #584).Andi Albrecht2020-10-191-0/+1
|
* Fix parsing of backticks (fixes #588).Andi Albrecht2020-10-191-1/+1
| | | | | The backticks in this operator regex was introduced in c794c97531c09e66b6a7ffac76626a727ad02f5e. Pretty sure it was by mistake.
* Switch back to development mode.Andi Albrecht2020-10-081-1/+1
|
* Bump version.0.4.1Andi Albrecht2020-10-081-1/+1
|
* Remove debug print statement (fixes #586).Andi Albrecht2020-10-081-2/+0
|
* Switch back to development mode.Andi Albrecht2020-10-071-1/+1
|
* Bump version to 0.4.0.0.4.0Andi Albrecht2020-10-071-1/+1
|
* Update copyright notice.Andi Albrecht2020-10-0721-21/+21
|
* Stabilize formatting of invalid WHERE clauses.Andi Albrecht2020-09-301-0/+3
|
* Improve formatting of type casts in parentheses.Andi Albrecht2020-09-301-0/+2
|
* Fix an issue with negative indexes causing IndexError in some cases.Andi Albrecht2020-09-301-0/+2
|
* Fix splitting of statements using CASE ... WHEN (fixes #580).Andi Albrecht2020-09-301-1/+1
|
* Fix splitting when using DECLARE ... HANDLER (fixes #581).Andi Albrecht2020-09-301-1/+1
|
* Don't make parsing of square bracket identifiers too greedy (fixes #583).Andi Albrecht2020-09-301-1/+1
|
* Add RLIKE keywordWill Jones2020-09-301-1/+1
|
* Add postgres WINDOW keywordali-tny2020-09-301-0/+1
| | | | | | | | | | | | | | | Postgres allows statements of the form: ```sql SELECT col_1, col_2, SUM(col_3) OVER w FROM x WINDOW w AS (PARTITION BY col_1 ORDER BY col_2) ``` where the window is defined once at the end of the query (see https://www.postgresql.org/docs/9.5/sql-select.html). This change adds WINDOW as a postgres keyword, preventing queries like the above being misparsed, with table name and WINDOW being grouped into an single identifier <Identifier 'x WINDOW'>.
* Preserve line breaks when removing comments (fixes #484).Andi Albrecht2020-09-131-7/+16
|
* Don't flush token streams iff they only contain whitespace tokens (fixes #496).Andi Albrecht2020-09-131-1/+1
|
* add regex pattern to identify IN as a Compasion tokenhurcy2020-09-131-1/+1
|
* Remove support for end-of-life PythonsJon Dufresne2020-08-3122-159/+76
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Python 2.7 and 3.4 are end-of-life. They are no longer receiving bug fixes, including for security issues. Python 2.7 went EOL on 2020-01-01 and 3.4 on 2019-03-18. For additional details on support Python versions, see: Supported: https://devguide.python.org/#status-of-python-branches EOL: https://devguide.python.org/devcycle/#end-of-life-branches Removing support for EOL Pythons will reduce testing and maintenance resources while allowing the library to move towards modern Python 3. Using pypinfo, we can show the PyPI download statistics, showing less than 10% of users are using Python 2.7. | python_version | percent | download_count | | -------------- | ------: | -------------: | | 3.7 | 45.36% | 3,056,010 | | 3.6 | 26.46% | 1,782,778 | | 3.8 | 12.22% | 823,213 | | 2.7 | 9.97% | 671,459 | | 3.5 | 5.86% | 394,846 | | 3.4 | 0.10% | 6,700 | | 3.9 | 0.03% | 2,346 | | 2.6 | 0.00% | 57 | | 3.3 | 0.00% | 21 | | 3.10 | 0.00% | 6 | | Total | | 6,737,436 | Library users who continue to use Python 2.7 will still be able to install previous versions of sqlparse. Compatibility shims have been dropped, simplifying the code. Using pyupgrade, the codebase has been updated to take advantage of modern syntax <https://github.com/asottile/pyupgrade>. The wheel is no longer marked as "universal" as it is now Python 3 only.
* [fix] Adding TypedLiteral to comparisonJohn Bodley2020-03-291-1/+1
|
* Switch back to develoment mode.Andreas Albrecht2020-02-291-1/+1
|
* Update version number for release.0.3.1Andreas Albrecht2020-02-291-1/+1
|
* [grouping] group_as() no longer groups AS CTELikai Liu2020-02-021-1/+1
| | | | | | | | | | | | | | | | | This patch changes the grouping of AS so that: Foo AS WITH bar AS 1 SELECT 2 with no longer be grouped as: [Identifier[Foo, AS, WITH, Identifier[Bar AS 1]], SELECT, 2] but will be grouped as: [Identifier[Foo], AS, WITH, Identifier[Bar AS 1], SELECT, 2] This fixes the parsing of CREATE TABLE new_table AS WITH ... so the rest of the tokens after AS are parsed the same as a bare WITH.
* [fix] Fixing typed literal regressionJohn Bodley2020-02-022-4/+3
|
* Update sql.pyJohn Bodley2020-01-201-1/+2
|
* Update sql.pyJohn Bodley2020-01-201-1/+1
|
* [sql] Adding TIMESTAMP to typed literalJohn Bodley2020-01-201-1/+1
|
* More test casesCorey Zumar2020-01-161-1/+1
|
* Add first test caseCorey Zumar2020-01-161-1/+1
|
* Map like and ilike clauses to comparisonsCorey Zumar2020-01-161-1/+1
|
* Stabilize grouping engine when parsing invalid SQL statements.Andreas Albrecht2020-01-061-2/+2
| | | | | It's just to make sure, that the comparison returns a valid result when feed with invalid SQL statements.
* Code cleanup.Andreas Albrecht2019-10-205-19/+26
|
* support typed literals (if that's what they're called)Dvořák Václav2019-10-203-6/+43
|
* [sql] Fix TokenList.__init__ when no tokens are providedJohn Bodley2019-10-091-1/+1
|
* [fix] Addressing issue #507John Bodley2019-10-091-3/+3
|
* Restrict detection of alias names (fixes #455).Andreas Albrecht2019-10-091-15/+27
| | | | | This change adopts some parts of the pull request #509 by john-bodley. Thanks!