summaryrefslogtreecommitdiff
path: root/sqlparse/sql.py
diff options
context:
space:
mode:
authorSjoerd Job Postmus <sjoerdjob@sjec.nl>2016-06-01 20:23:19 +0200
committerVictor Uriarte <victor.m.uriarte@intel.com>2016-06-12 17:23:21 -0700
commit6145070d6590f1e8f7fc4d86fb0a1061bc1a47d9 (patch)
treeeb0ad8e7a985c25c7a6b813d59bf4420c1cfdb60 /sqlparse/sql.py
parenta767c88b008d407d91b9118d124e2a9b579a7f12 (diff)
downloadsqlparse-6145070d6590f1e8f7fc4d86fb0a1061bc1a47d9.tar.gz
Call `Token`-methods index based.
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.
Diffstat (limited to 'sqlparse/sql.py')
0 files changed, 0 insertions, 0 deletions