summaryrefslogtreecommitdiff
path: root/sqlparse
Commit message (Collapse)AuthorAgeFilesLines
...
| * | Remove unused code from sql.py and style up some changesVictor Uriarte2016-06-141-38/+7
| | |
| * | Merge remote-tracking branch 'core/long_live_indexes' into developVictor Uriarte2016-06-143-69/+175
| |\ \ | | |/ | |/|
| | * Use a specialized token_idx_next.Sjoerd Job Postmus2016-06-122-4/+24
| | | | | | | | | | | | Prevent calling token_index.
| | * Index-based token_idx_prevSjoerd Job Postmus2016-06-122-8/+25
| | | | | | | | | | | | | | | Prevent some more calls to token_index in group_identifier_list. They are now all gone.
| | * Use specialized token_idx_next_by in group_aliased.Sjoerd Job Postmus2016-06-122-6/+24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The method group_aliased was making a lot of calls to token_index. By specializing token_next_by to token_idx_next_by, the calls to token_index became superfluous. Also use token_idx_next_by in group_identifier_list. It was making a lot of calls, which is now more than reduced in half.
| | * Re-use token index in group_identifier.Sjoerd Job Postmus2016-06-121-8/+13
| | |
| | * 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.
* | | Separate __main__ and main() to allow for testingVictor Uriarte2016-06-153-136/+173
| | | | | | | | | | | | | | | Also reference example in: https://github.com/ionelmc/cookiecutter-pylibrary
* | | Clarify `split` text processing on __init__.pyVictor Uriarte2016-06-151-2/+2
| | |
* | | Correct argparse --version flag for py3.Victor Uriarte2016-06-151-2/+7
|/ /
* | Fix token-parent behaviorVictor Uriarte2016-06-121-0/+3
| | | | | | | | Closes issue #226
* | Migrate optparse to argparse; optparse deprecated in py2.7Victor Uriarte2016-06-121-77/+106
| | | | | | | | cleanup example
* | Update setup.pyVictor Uriarte2016-06-121-0/+115
| | | | | | | | switch scripts to console-script
* | Refactor raw conversion on split_unquoted_newlinesVictor Uriarte2016-06-122-4/+4
| |
* | Remove token_first; its redundant to token_next(idx=0)Victor Uriarte2016-06-121-20/+8
| |
* | Restyle pprint_tree and align upto idx=99Victor Uriarte2016-06-121-3/+11
| |
* | Refactor groupingVictor Uriarte2016-06-121-8/+11
| | | | | | | | Alternate form to transverse the tlists and clean up matching.
* | Add sql.Operation tokenlistVictor Uriarte2016-06-122-7/+11
| |
* | Replace remove with list comprehension on sql.pyVictor Uriarte2016-06-111-1/+3
| | | | | | | | Help performance for #62, #135
* | Fix grouping of `case` within parenthesis.Victor Uriarte2016-06-111-0/+2
| | | | | | | | Closes #164
* | Updating Utilities for clarity and fix tokentype behaviorVictor Uriarte2016-06-111-10/+10
| |
* | Refactor sql.py insert_afterVictor Uriarte2016-06-111-1/+1
| |
* | Refactor sql.py group_tokensVictor Uriarte2016-06-111-19/+11
| | | | | | | | | | first token in group had no parents and almost became batman
* | Redo unicode-encoding on lexer.pyVictor Uriarte2016-06-111-11/+4
| |
* | Fix get_token_at_offset behavior at edgeVictor Uriarte2016-06-111-1/+1
| | | | | | | | | | At position 6 (with an index starting at 0) it should have been on 2nd word for the example sql='select * from dual'
* | Apply new-style str formatVictor Uriarte2016-06-113-20/+24
| |
* | Change variable name to lowercaseVictor Uriarte2016-06-111-4/+4
| |
* | Remove unneded code from sql.pyVictor Uriarte2016-06-111-12/+2
| | | | | | | | Remove HACK code. Code is now properly updated
* | clean up groupingVictor Uriarte2016-06-111-3/+4
| |
* | Merge pull request #253 from vmuriart/refactor_filtersVik2016-06-093-295/+213
|\ \ | | | | | | Refactor filters
| * | Refactor leading wsVictor Uriarte2016-06-091-4/+6
| | |
| * | Remove redundant tokenVictor Uriarte2016-06-091-6/+5
| | | | | | | | | | | | no point in returning tk to remove it right after
| * | Clean-up flatten uptoVictor Uriarte2016-06-091-6/+7
| | |
| * | Refactor various Indent GroupingsVictor Uriarte2016-06-091-58/+34
| | |
| * | refactor next opkenVictor Uriarte2016-06-091-24/+20
| | |
| * | refactor reindentVictor Uriarte2016-06-091-53/+29
| | |
| * | Add customizable newlineVictor Uriarte2016-06-091-2/+3
| | |
| * | refactor process caseVictor Uriarte2016-06-091-12/+9
| | |
| * | Add indent and nl()Victor Uriarte2016-06-091-63/+37
| | |
| * | remove leftover returnsVictor Uriarte2016-06-091-2/+1
| | |
| * | Remove returnsVictor Uriarte2016-06-091-9/+3
| | |
| * | Remove base_indentVictor Uriarte2016-06-091-20/+23
| | |
| * | refactor next tokenVictor Uriarte2016-06-091-17/+18
| | |
| * | whitespace filterVictor Uriarte2016-06-091-9/+12
| | |
| * | Update SpacesAroundOperatorsFilterVictor Uriarte2016-06-091-19/+14
| | |
| * | Refactor StripCommentsFilterVictor Uriarte2016-06-091-17/+18
| | |
| * | update serializerunicodeVictor Uriarte2016-06-091-3/+3
| | |
* | | Update init and misc filesVictor Uriarte2016-06-062-9/+10
|/ /