added logger and logging addon
This commit is contained in:
@@ -0,0 +1,50 @@
|
||||
``sqlparse`` is a non-validating SQL parser module.
|
||||
It provides support for parsing, splitting and formatting SQL statements.
|
||||
|
||||
Visit the `project page <https://github.com/andialbrecht/sqlparse>`_ for
|
||||
additional information and documentation.
|
||||
|
||||
**Example Usage**
|
||||
|
||||
|
||||
Splitting SQL statements::
|
||||
|
||||
>>> import sqlparse
|
||||
>>> sqlparse.split('select * from foo; select * from bar;')
|
||||
[u'select * from foo; ', u'select * from bar;']
|
||||
|
||||
|
||||
Formatting statemtents::
|
||||
|
||||
>>> sql = 'select * from foo where id in (select id from bar);'
|
||||
>>> print sqlparse.format(sql, reindent=True, keyword_case='upper')
|
||||
SELECT *
|
||||
FROM foo
|
||||
WHERE id IN
|
||||
(SELECT id
|
||||
FROM bar);
|
||||
|
||||
|
||||
Parsing::
|
||||
|
||||
>>> sql = 'select * from someschema.mytable where id = 1'
|
||||
>>> res = sqlparse.parse(sql)
|
||||
>>> res
|
||||
(<Statement 'select...' at 0x9ad08ec>,)
|
||||
>>> stmt = res[0]
|
||||
>>> str(stmt) # converting it back to unicode
|
||||
'select * from someschema.mytable where id = 1'
|
||||
>>> # This is how the internal representation looks like:
|
||||
>>> stmt.tokens
|
||||
(<DML 'select' at 0x9b63c34>,
|
||||
<Whitespace ' ' at 0x9b63e8c>,
|
||||
<Operator '*' at 0x9b63e64>,
|
||||
<Whitespace ' ' at 0x9b63c5c>,
|
||||
<Keyword 'from' at 0x9b63c84>,
|
||||
<Whitespace ' ' at 0x9b63cd4>,
|
||||
<Identifier 'somes...' at 0x9b5c62c>,
|
||||
<Whitespace ' ' at 0x9b63f04>,
|
||||
<Where 'where ...' at 0x9b5caac>)
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1 @@
|
||||
pip
|
||||
@@ -0,0 +1,74 @@
|
||||
Metadata-Version: 2.0
|
||||
Name: sqlparse
|
||||
Version: 0.2.4
|
||||
Summary: Non-validating SQL parser
|
||||
Home-page: https://github.com/andialbrecht/sqlparse
|
||||
Author: Andi Albrecht
|
||||
Author-email: albrecht.andi@gmail.com
|
||||
License: BSD
|
||||
Platform: UNKNOWN
|
||||
Classifier: Development Status :: 4 - Beta
|
||||
Classifier: Intended Audience :: Developers
|
||||
Classifier: License :: OSI Approved :: BSD License
|
||||
Classifier: Operating System :: OS Independent
|
||||
Classifier: Programming Language :: Python
|
||||
Classifier: Programming Language :: Python :: 2
|
||||
Classifier: Programming Language :: Python :: 2.7
|
||||
Classifier: Programming Language :: Python :: 3
|
||||
Classifier: Programming Language :: Python :: 3.3
|
||||
Classifier: Programming Language :: Python :: 3.4
|
||||
Classifier: Programming Language :: Python :: 3.5
|
||||
Classifier: Programming Language :: Python :: 3.6
|
||||
Classifier: Topic :: Database
|
||||
Classifier: Topic :: Software Development
|
||||
|
||||
``sqlparse`` is a non-validating SQL parser module.
|
||||
It provides support for parsing, splitting and formatting SQL statements.
|
||||
|
||||
Visit the `project page <https://github.com/andialbrecht/sqlparse>`_ for
|
||||
additional information and documentation.
|
||||
|
||||
**Example Usage**
|
||||
|
||||
|
||||
Splitting SQL statements::
|
||||
|
||||
>>> import sqlparse
|
||||
>>> sqlparse.split('select * from foo; select * from bar;')
|
||||
[u'select * from foo; ', u'select * from bar;']
|
||||
|
||||
|
||||
Formatting statemtents::
|
||||
|
||||
>>> sql = 'select * from foo where id in (select id from bar);'
|
||||
>>> print sqlparse.format(sql, reindent=True, keyword_case='upper')
|
||||
SELECT *
|
||||
FROM foo
|
||||
WHERE id IN
|
||||
(SELECT id
|
||||
FROM bar);
|
||||
|
||||
|
||||
Parsing::
|
||||
|
||||
>>> sql = 'select * from someschema.mytable where id = 1'
|
||||
>>> res = sqlparse.parse(sql)
|
||||
>>> res
|
||||
(<Statement 'select...' at 0x9ad08ec>,)
|
||||
>>> stmt = res[0]
|
||||
>>> str(stmt) # converting it back to unicode
|
||||
'select * from someschema.mytable where id = 1'
|
||||
>>> # This is how the internal representation looks like:
|
||||
>>> stmt.tokens
|
||||
(<DML 'select' at 0x9b63c34>,
|
||||
<Whitespace ' ' at 0x9b63e8c>,
|
||||
<Operator '*' at 0x9b63e64>,
|
||||
<Whitespace ' ' at 0x9b63c5c>,
|
||||
<Keyword 'from' at 0x9b63c84>,
|
||||
<Whitespace ' ' at 0x9b63cd4>,
|
||||
<Identifier 'somes...' at 0x9b5c62c>,
|
||||
<Whitespace ' ' at 0x9b63f04>,
|
||||
<Where 'where ...' at 0x9b5caac>)
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,53 @@
|
||||
sqlparse/__init__.py,sha256=ajh6cAPxajZn_GSH0a0cUY0p1HIkRdWwcQJyJ48WfgU,2224
|
||||
sqlparse/__main__.py,sha256=25CKuFddBqNfRDXQOsJC5N6qQ1xkyBcPjDLMppoiNtc,609
|
||||
sqlparse/cli.py,sha256=J3gtHygxEve1njid58P2Ct4eV2IPyrdOtbfkaVStJ0c,5379
|
||||
sqlparse/compat.py,sha256=8fmZfN3hJDm_geql68_dAbboViSO-2YLD3gn6hXrPR8,1140
|
||||
sqlparse/exceptions.py,sha256=2H6Eq4GO7GqATEMGVKHJXA3mKDSHdI_keoSvy7XRK7U,341
|
||||
sqlparse/formatter.py,sha256=8uXJo-eROOSsjm2TQu0wVnseMRG6nAnhQHQYDZrFtII,6836
|
||||
sqlparse/keywords.py,sha256=8uDNSh-toWnQjql6TWOKhATXGwih8_La8O6irivgW8w,24861
|
||||
sqlparse/lexer.py,sha256=zqYb-aQhYvDsz0SfLL7An0XMRE9NsfA7srXSle4piV8,2506
|
||||
sqlparse/sql.py,sha256=ceQLDAx5bJt_C4B220AoqsZ0x1akhU9LCnJ9y1QM-hM,19492
|
||||
sqlparse/tokens.py,sha256=6dj7bgEXC17mHFly8umed1NreYc3qYqIc6WwqrkoznA,1657
|
||||
sqlparse/utils.py,sha256=x24_nvnVFAzUiobI-4zz4lbxop4dAQxfyj01f685nhM,3484
|
||||
sqlparse/engine/__init__.py,sha256=l4qPN6SZuGlQiKCKA02RgQiy8rGcyatS1cxuI5hPVKM,446
|
||||
sqlparse/engine/filter_stack.py,sha256=RFKtJum9yAz-3GYtneF_9SExfPmB0RTzfjlnptS6MVc,1200
|
||||
sqlparse/engine/grouping.py,sha256=h1Ci0fNl1GIN73VSkYeAIAcPmfnyzrHq3s9P3Jd_j_Q,11428
|
||||
sqlparse/engine/statement_splitter.py,sha256=9rVwIMyDi6pLV12beTgniYmPz0BoAytgKXB_oAGfawk,3648
|
||||
sqlparse/filters/__init__.py,sha256=210gDlKEXqkm0i5JKd0mnLxrgbI8tKcVlkw06MPE_cA,1241
|
||||
sqlparse/filters/aligned_indent.py,sha256=ieWiMSO0zev8QqsJDEKayDoQ5l3RArFCOaBVrWJ5gBQ,4932
|
||||
sqlparse/filters/others.py,sha256=p7C5g2qs9-YE2nfwDn0MwwAy32vWjmszLgL9mTsjOt8,4350
|
||||
sqlparse/filters/output.py,sha256=S9sakYxe1FNH0DiyMyLMSn3AFMm842m2n7sNUBp47LU,4051
|
||||
sqlparse/filters/reindent.py,sha256=2Mu7UeQnWy0zdcSGKQhK5tBpPfWTi3W_2K75sJuhOKQ,6985
|
||||
sqlparse/filters/right_margin.py,sha256=JvN9fEzlUC4gJmsqPNA86FV6aRZdd76zyyjXv8_RhJQ,1595
|
||||
sqlparse/filters/tokens.py,sha256=R0eqZ7MOVjEGA9dZEI6hFhkFzFAA66lcq3jpV6pUEj8,1612
|
||||
sqlparse-0.2.4.dist-info/DESCRIPTION.rst,sha256=hTPnv4Qw5GhiENkYNi295N1ZCCWqpcITVovuRplK27A,1353
|
||||
sqlparse-0.2.4.dist-info/METADATA,sha256=Fc5aieueSauuNTCdqCJ8DLdEHSBBm47KWM--R5Uo-zQ,2230
|
||||
sqlparse-0.2.4.dist-info/RECORD,,
|
||||
sqlparse-0.2.4.dist-info/WHEEL,sha256=o2k-Qa-RMNIJmUdIc7KU6VWR_ErNRbWNlxDIpl7lm34,110
|
||||
sqlparse-0.2.4.dist-info/entry_points.txt,sha256=S2WxhPln7zXybKRE73ekBicXHh7_BX-KYGFZZaGGqp8,54
|
||||
sqlparse-0.2.4.dist-info/metadata.json,sha256=2J-H8kxvx2I3m4AHyiMWR2xFQ2t_IFQ3JTFxe572GZI,1112
|
||||
sqlparse-0.2.4.dist-info/top_level.txt,sha256=eRYisOR7d8EtLKXuWUUAAMOhODItOqrkpxkAGD8CISo,9
|
||||
../../../bin/sqlformat,sha256=aQnHcYophHuvuy0D2Lvp2E27qwIFTbSayuKstj7TJyE,248
|
||||
sqlparse-0.2.4.dist-info/INSTALLER,sha256=zuuue4knoyJ-UwPPXg8fezS7VCrXJQrAP7zeNuwvFQg,4
|
||||
sqlparse/filters/__pycache__/output.cpython-36.pyc,,
|
||||
sqlparse/filters/__pycache__/aligned_indent.cpython-36.pyc,,
|
||||
sqlparse/filters/__pycache__/tokens.cpython-36.pyc,,
|
||||
sqlparse/filters/__pycache__/right_margin.cpython-36.pyc,,
|
||||
sqlparse/filters/__pycache__/__init__.cpython-36.pyc,,
|
||||
sqlparse/filters/__pycache__/reindent.cpython-36.pyc,,
|
||||
sqlparse/filters/__pycache__/others.cpython-36.pyc,,
|
||||
sqlparse/__pycache__/lexer.cpython-36.pyc,,
|
||||
sqlparse/__pycache__/formatter.cpython-36.pyc,,
|
||||
sqlparse/__pycache__/exceptions.cpython-36.pyc,,
|
||||
sqlparse/__pycache__/cli.cpython-36.pyc,,
|
||||
sqlparse/__pycache__/keywords.cpython-36.pyc,,
|
||||
sqlparse/__pycache__/sql.cpython-36.pyc,,
|
||||
sqlparse/__pycache__/tokens.cpython-36.pyc,,
|
||||
sqlparse/__pycache__/__main__.cpython-36.pyc,,
|
||||
sqlparse/__pycache__/compat.cpython-36.pyc,,
|
||||
sqlparse/__pycache__/utils.cpython-36.pyc,,
|
||||
sqlparse/__pycache__/__init__.cpython-36.pyc,,
|
||||
sqlparse/engine/__pycache__/statement_splitter.cpython-36.pyc,,
|
||||
sqlparse/engine/__pycache__/grouping.cpython-36.pyc,,
|
||||
sqlparse/engine/__pycache__/filter_stack.cpython-36.pyc,,
|
||||
sqlparse/engine/__pycache__/__init__.cpython-36.pyc,,
|
||||
@@ -0,0 +1,6 @@
|
||||
Wheel-Version: 1.0
|
||||
Generator: bdist_wheel (0.29.0)
|
||||
Root-Is-Purelib: true
|
||||
Tag: py2-none-any
|
||||
Tag: py3-none-any
|
||||
|
||||
@@ -0,0 +1,3 @@
|
||||
[console_scripts]
|
||||
sqlformat = sqlparse.__main__:main
|
||||
|
||||
@@ -0,0 +1 @@
|
||||
{"classifiers": ["Development Status :: 4 - Beta", "Intended Audience :: Developers", "License :: OSI Approved :: BSD License", "Operating System :: OS Independent", "Programming Language :: Python", "Programming Language :: Python :: 2", "Programming Language :: Python :: 2.7", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.3", "Programming Language :: Python :: 3.4", "Programming Language :: Python :: 3.5", "Programming Language :: Python :: 3.6", "Topic :: Database", "Topic :: Software Development"], "extensions": {"python.commands": {"wrap_console": {"sqlformat": "sqlparse.__main__:main"}}, "python.details": {"contacts": [{"email": "albrecht.andi@gmail.com", "name": "Andi Albrecht", "role": "author"}], "document_names": {"description": "DESCRIPTION.rst"}, "project_urls": {"Home": "https://github.com/andialbrecht/sqlparse"}}, "python.exports": {"console_scripts": {"sqlformat": "sqlparse.__main__:main"}}}, "generator": "bdist_wheel (0.29.0)", "license": "BSD", "metadata_version": "2.0", "name": "sqlparse", "summary": "Non-validating SQL parser", "version": "0.2.4"}
|
||||
@@ -0,0 +1 @@
|
||||
sqlparse
|
||||
Reference in New Issue
Block a user