Files
impala/shell/ext-py/sqlparse-0.1.14/docs/source/index.rst
casey 71c5ec7af5 IMPALA-1612: (shell) Upgrade sqlparse for bug fix
The only thing this commit does is upgrade sqlparse. The upgrade was
done by downloading and extracting the tarball, nothing else (such as
patching). The older version of sqlparse would parse

SELECT
'
;
'
;

into two statements. Neither statement is complete due to the open quote
and this would cause an infinite loop. The bug is already fixed in the
newest version of sqlparse.

Change-Id: I7ce7c269769ae0cde3dc8ca386d0b0e11bea71c1
Reviewed-on: http://gerrit.cloudera.org:8080/102
Reviewed-by: Casey Ching <casey@cloudera.com>
Tested-by: Internal Jenkins
2015-02-25 23:50:59 +00:00

62 lines
1.3 KiB
ReStructuredText

.. python-sqlparse documentation master file, created by
sphinx-quickstart on Thu Feb 26 08:19:28 2009.
You can adapt this file completely to your liking, but it should at least
contain the root `toctree` directive.
python-sqlparse
===============
:mod:`sqlparse` is a non-validating SQL parser for Python.
It provides support for parsing, splitting and formatting SQL statements.
The module is compatible with Python 2 (>= 2.5) and Python 3 (>= 3.2)
and released under the terms of the `New BSD license
<http://www.opensource.org/licenses/bsd-license.php>`_.
Visit the project page at https://github.com/andialbrecht/sqlparse for
further information about this project.
tl;dr
-----
.. code-block:: bash
$ pip install sqlparse
$ python
>>> import sqlparse
>>> print(sqlparse.format('select * from foo', reindent=True))
select *
from foo
>>> parsed = sqlparse.parse('select * from foo')[0]
>>> parsed.tokens
[<DML 'select' at 0x7f22c5e15368>, <Whitespace ' ' at 0x7f22c5e153b0>, <Wildcard '*']
>>>
Contents
--------
.. toctree::
:maxdepth: 2
intro
api
analyzing
ui
changes
indices
Resources
---------
Project page
https://github.com/andialbrecht/sqlparse
Bug tracker
https://github.com/andialbrecht/sqlparse/issues
Documentation
http://sqlparse.readthedocs.org/