summaryrefslogtreecommitdiff
path: root/sqlparse
Commit message (Collapse)AuthorAgeFilesLines
* Fix typostypoVictor Uriarte2017-11-298-18/+18
|
* Merge pull request #345 from johshoff/masterAndi Albrecht2017-11-243-2/+15
|\ | | | | Option to indent after first line
| * Adhere to styleJohannes Hoff2017-11-231-1/+1
| |
| * Option to indent after first lineJohannes Hoff2017-06-203-2/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This adds a command line argument `--indent_after_first` which sets the indentation of all lines after the first one, e.g. SELECT, UPDATE, etc. For example: $ sqlparse/__main__.py -r sample.sql UPDATE foo SET a = 1 WHERE a > 2 AND a < 10; $ sqlparse/__main__.py -r --indent_after_first sample.sql UPDATE foo SET a = 1 WHERE a > 2 AND a < 10;
* | Fix unclosed file warnings discovered during testsJon Dufresne2017-10-281-2/+5
| | | | | | | | | | | | | | | | Appear as: ResourceWarning: unclosed file ... Always explicitly close files or detach file wrappers.
* | Switch back to development.Andi Albrecht2017-09-271-1/+1
| |
* | This is 0.2.4.0.2.4Andi Albrecht2017-09-271-1/+1
| |
* | Close files during tests.Andi Albrecht2017-09-241-1/+6
| |
* | Fix handling of semicolon when grouping assignments (fixes #359).Andi Albrecht2017-09-241-1/+1
| | | | | | | | | | | | When grouping assignments that contain a semicolon itself, the engine was too greedy. Assignments with semicolon were introduced in 691c0400e5a7d8229b7dce09bf47176539add328.
* | Merge branch 'master' into masterAndi Albrecht2017-09-213-14/+32
|\ \
| * | Code cleanup.Andi Albrecht2017-09-141-11/+11
| | |
| * | Merge pull request #357 from Demetrio92/masterAndi Albrecht2017-09-141-0/+16
| |\ \ | | | | | | | | add PL/pgSQL syntax
| | * | add PL/pgSQL syntaxDemetrio922017-08-071-0/+16
| | | | | | | | | | | | tested with mxtr/SQLTools
| * | | Extend alphas with accented charactersmvbentes2017-08-251-7/+7
| |/ /
| * | Don't treat sysdate as a builtin (fixes #344).Andi Albrecht2017-07-291-1/+1
| | | | | | | | | | | | | | | | | | According to Oracle's developer documentation sysdate is a function that doesn't require any parameters. Hence it's different from other builtins like int or varchar.
| * | Fix parsing of UNION ALL after WHERE (fixes #349).Andi Albrecht2017-07-291-2/+3
| |/
| * Recognize MySQL table names starting with digits (fixes #337).Andi Albrecht2017-05-251-2/+2
| |
| * Add MySQL keywords: ENGINE, AUTO_INCREMENT, CHARSETOleg Broytman2017-05-111-0/+3
| | | | | | | | | | | | | | | | | | These are keywords from table options: CREATE TABLE name ( column definitions, ... ) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8;
| * Use generator expression to avoid unnecessary temporary listJon Dufresne2017-04-291-2/+2
| |
* | adds '1.' option support for float numbers regexatronah2017-04-301-2/+3
|/
* Merge pull request #328 from phdru/mysql_unlockAndi Albrecht2017-04-191-0/+1
|\ | | | | Add UNLOCK keyword
| * Add UNLOCK keywordOleg Broytman2017-04-141-0/+1
| |
* | Re-order parsing so that comparisons are seens as identifiers (fixes #327).Andi Albrecht2017-04-181-2/+2
|/
* Switch back to development version.Andi Albrecht2017-03-021-1/+1
|
* Bump version.0.2.3Andi Albrecht2017-03-021-1/+1
|
* Fix parsing of INTO keyword in WHERE clauses (fixes #324).Andi Albrecht2017-03-021-1/+1
|
* CONCURRENTLY should be handled as a keywordRowan Seymour2017-02-091-0/+1
|
* Putting LIMIT on a new line #320Romain Rigaux2017-02-041-1/+1
| | | https://github.com/andialbrecht/sqlparse/issues/320
* Don't treat GROUPS as a keyword, it's too common for table names.Andi Albrecht2017-01-241-1/+2
|
* Don't treat STATE as a keyword, it causes too much troubles (fixes #296).Andi Albrecht2017-01-231-1/+1
|
* CLI: Add --encoding optionTao Wang2017-01-121-6/+15
| | | | | | | | * Add `--encoding` option with default utf-8 * Make sure input and output are in same encoding * Add test cases Signed-off-by: Tao Wang <twang2218@gmail.com>
* Fix encoding logic/orderVictor Uriarte2017-01-101-5/+6
| | | | | | - If user provides an encoding value, use it instead of trying to _guess_ first. - If no value is provided, then decode with default of utf-8, otherwise try with unicode-escape
* Fix #315 support utf-8 by defaultTao Wang2017-01-111-1/+1
| | | | Signed-off-by: Tao Wang <twang2218@gmail.com>
* Fix _flatten_up_to_token() to be PEP 479 compatibleJon Dufresne2017-01-101-1/+1
| | | | | | | | Fixes warning during tests: PendingDeprecationWarning: generator 'ReindentFilter._flatten_up_to_token' raised StopIteration PEP 479 documentation: https://www.python.org/dev/peps/pep-0479/
* Make reindent more robust regarding max recursion errors.Andi Albrecht2016-10-251-1/+2
|
* Fix an edge-case with subselects in CASE clauses.Andi Albrecht2016-10-241-1/+2
|
* Fix special case for #284 when statement starts with orphaned AS.Andi Albrecht2016-10-241-1/+1
|
* Switch back to development mode.Andi Albrecht2016-10-221-1/+1
|
* Bump version.0.2.2Andi Albrecht2016-10-221-1/+1
|
* Handle operator grouping after identifying typecasts (fixes #297).Andi Albrecht2016-10-011-1/+1
|
* Fix parsing of UNION ALL (fixes #294).Andi Albrecht2016-09-261-0/+1
|
* Revert "Fix test failure on Python 3.6 (fixes #286)."Andi Albrecht2016-09-211-2/+0
| | | | | | | This reverts commit a03e7fd681e275dfd214f1196bad94af225a9d68. This change isn't needed anymore. The actual problem was solved in cpython: https://hg.python.org/cpython/rev/1a2b8398f045/
* Merge pull request #293 from timgraham/flake8Andi Albrecht2016-09-201-1/+1
|\ | | | | Fix flake8 warnings.
| * Fix flake8 warnings.Tim Graham2016-09-201-1/+1
| |
* | Fix test failure on Python 3.6 (fixes #286).Tim Graham2016-09-201-0/+2
|/
* Better formatting when using comma-first notation (issue141).Andi Albrecht2016-09-171-3/+7
|
* Add formatter option for comma first notation (fixes #141).Andi Albrecht2016-09-143-2/+30
|
* Correct license link (fixes #288).Andi Albrecht2016-09-1422-22/+22
|
* Fix parsing of names containing special chars (fixes 291).Andi Albrecht2016-09-141-2/+2
|
* Decode bytes to unicode in Lexer.get_tokens().Oleg Broytman2016-08-312-19/+18
| | | | | | | Raise TypeError if the input is neither bytes in a known encoding nor unicode nor a file-like object (file, StringIO). Remove function u(). Add bytes_type to compat. Add tests for non-ascii.