sqlparser安装包(Python2)

时间:2021-06-22 14:15:23
【文件属性】:
文件名称:sqlparser安装包(Python2)
文件大小:85KB
文件格式:ZIP
更新时间:2021-06-22 14:15:23
SQL 格式化 在项目开发中, 涉及到对SQL语句的展示, 对于复杂的SQL语句, 特别希望能够将其格式化后展示, 因此找到了开源项目sqlparser, 官网是https://github.com/andialbrecht/sqlparse。 使用Python2安装以后可以直接使用, 测试代码: 使用python2, import sqlparse print(sqlparse.format('update t set s=(case when total > 100 then 10 when total >=10 and total<100 then (case when YY>100 then 8 when YY>10 and yy<100 then 6 else 4 end ) else 2 end)', reindent=False))
【文件预览】:
sqlparse-master
----MANIFEST.in(228B)
----README.rst(1KB)
----AUTHORS(2KB)
----sqlparse()
--------sql.py(19KB)
--------exceptions.py(341B)
--------compat.py(1KB)
--------filters()
--------formatter.py(7KB)
--------utils.py(3KB)
--------tokens.py(2KB)
--------__init__.py(2KB)
--------__main__.py(609B)
--------lexer.py(2KB)
--------cli.py(6KB)
--------engine()
--------keywords.py(25KB)
----examples()
--------extract_table_names.py(2KB)
--------column_defs_lowlevel.py(2KB)
----.travis.yml(524B)
----tox.ini(358B)
----LICENSE(2KB)
----setup.cfg(232B)
----setup.py(3KB)
----Makefile(543B)
----TODO(290B)
----docs()
--------sqlformat.1(2KB)
--------source()
--------Makefile(3KB)
----.editorconfig(338B)
----tests()
--------test_cli.py(4KB)
--------test_keywords.py(448B)
--------test_regressions.py(12KB)
--------__init__.py(0B)
--------test_parse.py(13KB)
--------test_split.py(4KB)
--------test_tokenize.py(5KB)
--------conftest.py(2KB)
--------test_grouping.py(18KB)
--------files()
--------test_format.py(23KB)
----.gitignore(262B)
----CHANGELOG(14KB)

网友评论