mirror of
https://github.com/apache/impala.git
synced 2025-12-19 18:12:08 -05:00
sqlparse-0.1.19 is the last version of sqlparse that supports Python 2.6. Testing: - Ran all end-to-end tests Change-Id: Ide51ef3ac52d25a96b0fa832e29b6535197d23cb Reviewed-on: http://gerrit.cloudera.org:8080/10354 Reviewed-by: David Knupp <dknupp@cloudera.com> Tested-by: Impala Public Jenkins <impala-public-jenkins@cloudera.com>
62 lines
1.3 KiB
ReStructuredText
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/
|