summaryrefslogtreecommitdiff
path: root/sqlparse
Commit message (Collapse)AuthorAgeFilesLines
* Replace _group_matching with an inward-out grouping algorithmSjoerd Job Postmus2016-06-123-13/+30
| | | | | | | | | | | All the matching between open/close was done all the time, first finding the matching closing token, and then grouping the tokens in between, and recurse over the newly created list. Instead, it is more efficient to look for the previous open-token on finding a closing-token, group these two together, and then continue on. squashed: Handle token indices in group_tokens_between and find_matching.
* Special-case group_tokens(..., tokens_between())Sjoerd Job Postmus2016-06-122-24/+37
| | | | | | When having been guaranteed that the tokens form a range, it is possible to get rid of a lot of calls to `Token.tokens.remove(...)` which are expensive.
* Call `Token`-methods index based.Sjoerd Job Postmus2016-06-122-25/+27
| | | | | | | | | | A lot of methods have token-to-idx magic due to `Token._find_matching` converting tokens to indexes. Unknowingly, this turns innocent looking algorithms into O(n^2) (or worse). This does not solve the problem, but makes it more clear by moving the call to `Token.token_index` obvious at the call-site, at the cost of repeating it over-and-over.
* CREATE TABLE should not be parsed as FunctionTenghuan2016-05-291-0/+9
|
* Merge pull request #236 from koljonen/using_directly_followed_by_parenthesisAndi Albrecht2016-05-281-0/+1
|\ | | | | Recognize USING as a keyword in 'USING(', not just in 'USING ('
| * Don't call is_keyword for the new 'USING(' regexkoljonen2016-05-151-1/+1
| |
| * Recognize USING as a keyword in 'USING(', not just in 'USING ('koljonen2016-05-141-0/+1
| | | | | | | | These were previously caught by (r'[^\W\d_]\w*(?=[.(])', tokens.Name), so I added a special regex just above that one.
* | Fix small typo in documentationDag Wieers2016-05-261-2/+2
| |
* | refactor group_commentsVictor Uriarte2016-05-111-15/+9
| |
* | refactor sql.py functionsVictor Uriarte2016-05-112-85/+31
| |
* | separate identifier grouping into its componentsVictor Uriarte2016-05-101-77/+50
| | | | | | | | | | leaving sql.Operations in for future PR small behavior changed for invalid identifier
* | refactor identifier list and alias groupingVictor Uriarte2016-05-101-62/+26
| |
* | refactor remove quotesVictor Uriarte2016-05-101-11/+3
| |
* | refactor _group_left_rightVictor Uriarte2016-05-101-64/+39
| |
* | group all the one-offsVictor Uriarte2016-05-101-31/+21
| |
* | Add group matching M_tokens and refactor group matchingVictor Uriarte2016-05-103-110/+38
| | | | | | | | remove slots in subclasses
* | Introduce @recurse to refactor recursionVictor Uriarte2016-05-102-11/+12
| |
* | generalize group_tokens for more use casesVictor Uriarte2016-05-102-19/+29
| |
* | adding powerful _token_matching and imt helperVictor Uriarte2016-05-101-6/+30
| |
* | update sqlVictor Uriarte2016-05-101-8/+8
| |
* | Update compat and utilsVictor Uriarte2016-05-102-13/+98
|/
* Improve identifier parsing when identifier is a literal combined with order ↵Andi Albrecht2016-04-061-0/+2
| | | | keyword (fixes #101).
* Fix #230 (function comparison grouping)saaj2016-04-051-1/+2
|
* Code cleanup.Andi Albrecht2016-04-033-33/+28
|
* Token keyword correctionCauê Beloni2016-03-291-1/+1
|
* Ensure get_type() works for queries that use WITH.Andrew Tipton2016-03-023-1/+14
|
* Add keyword 'SEQUENCE'Shen Longxing2015-12-221-0/+1
| | | For now, sqlparse does not support 'create sequence' statement. Add keyword 'SEQUENCE' to support it.
* fix issue #215Shen Longxing2015-12-181-2/+2
| | | Add splitlevel for while/end while
* fix issue #215Shen Longxing2015-12-181-1/+1
| | | Add token for 'END WHILE'
* fix issue #215Shen Longxing2015-12-181-0/+1
| | | Add keyword 'WHILE'
* fix issue #213Shen Longxing2015-12-141-1/+3
|
* Fix version check when casting TokenList to string (fixes #212).Andi Albrecht2015-12-081-1/+1
|
* Merge branch 'hotfix'.Andi Albrecht2015-12-081-3/+3
|\
| * Workaround to avoid IndexError when grouping identifiers.Andi Albrecht2015-12-081-3/+3
| |
* | Remove SQLParseError from top-level module.Andi Albrecht2015-10-261-2/+0
| |
* | Remove sql.Token.to_unicode.Andi Albrecht2015-10-261-8/+0
| |
* | Remove conditional for OrderedDict.Andi Albrecht2015-10-261-46/+24
| | | | | | | | All supported Python versions have OrderedDict.
* | Skip tests for SQLParseError for now, it will go away soon.Andi Albrecht2015-10-261-1/+1
| |
* | Cleanup module code.Andi Albrecht2015-10-268-31/+31
| |
* | Fix tab expansion for Python 3.Andi Albrecht2015-10-261-5/+7
| |
* | Use compat module for single Python 2/3 code base.Andi Albrecht2015-10-265-38/+44
| | | | | | | | This change includes minor fixes and code cleanup too.
* | Add compatibility module from v0.2.0 branch.Andi Albrecht2015-10-261-0/+42
| |
* | Switch back to development.Andi Albrecht2015-10-251-1/+1
|/
* Bump version for 0.1.18 release.Tim Graham2015-10-241-1/+1
|
* Merge branch 'master' of github.com:andialbrecht/sqlparseAndi Albrecht2015-10-241-1/+1
|\
| * Merge pull request #202 from timgraham/generator-stopiterationAndi Albrecht2015-10-241-1/+1
| |\ | | | | | | Fix PendingDeprecationWarning on Python 3.5.
| | * Fix PendingDeprecationWarning on Python 3.5.Tim Graham2015-10-231-1/+1
| | | | | | | | | | | | | | | Avoid "PendingDeprecationWarning: generator 'group_identifier.<locals>._consume_cycle' raised StopIteration."
* | | Switch back to development mode.Andi Albrecht2015-10-241-1/+1
|/ /
* | Bump version number.0.1.17Andi Albrecht2015-10-241-1/+1
|/
* Speed up token_index by providing a starting index.Ryan Wooden2015-10-212-9/+19
|