zoukankan      html  css  js  c++  java
  • sql parser

    最近在整理很多SQL代码, 需要分析出每个SQL的目标表和源表各有哪些, 网上没有找到工作具, 打算写个工具.

    Java调研结果:
    1. 商业组件包 sqlparser 有试用版组件, 限制SQL少于10000字符,99天后过期
    2. 使用 presto 的 parser 或 druid 的 parser. 
    3. 使用 JSqlParser
    时间紧任务重, 暂时先用商业组件包 sqlparser 试用版组件完成手头任务. 有空考虑 presto 和 JSqlParser 做一个工具.

    Python 调研结果: https://github.com/andialbrecht/sqlparse 更好一些. 


    下面网上找到的资源:

    有没有好用的开源sql语法分析器?
    https://www.zhihu.com/question/51676071
    讨论中有推荐 presto

    利用 druid 的 sql parser 模块解析 sql 语句
    http://www.cnblogs.com/etangyushan/p/5490183.html


    JSqlParser
    https://github.com/JSQLParser/JSqlParser
    http://www.cnblogs.com/liuwt0911/p/4420472.html


    python  
    https://github.com/andialbrecht/sqlparse
    https://pypi.org/project/PySQLParser/

    商业组件包 sqlparser, 支持VCL/.Net/Java, 有试用版(限制SQL少于10000字符,99天后过期)
    http://www.sqlparser.com/download.php

    商业组件包 sqlparser的 python-bind(用C写的, 编译麻烦些)
    https://github.com/TwoLaid/python-sqlparser


    FoundationDB 的 sql-parser(FoundationDB已经转为闭源项目)
    http://blog.csdn.net/isea533/article/details/38361911

  • 相关阅读:
    2822 爱在心中
    P1707 刷题比赛
    1269 匈牙利游戏
    1482 路线统计
    Codevs 1287 矩阵乘法&&Noi.cn 09:矩阵乘法(矩阵乘法练手题)
    P2022 有趣的数
    1087 麦森数
    P1111 修复公路
    python为在线漫画站点自制非官方API(未完待续)
    逻辑运算0==x和x==0具体解释
  • 原文地址:https://www.cnblogs.com/harrychinese/p/sql_parser.html
Copyright © 2011-2022 走看看