Anyone know of a Ruby SQL parser?

前端 未结 4 1623
我寻月下人不归
我寻月下人不归 2021-01-05 02:07

Anyone know of a Ruby SQL parser?

相关标签:
4条回答
  • 2021-01-05 02:45

    Here's an example of a SQL parser done with rparsec:

    http://docs.codehaus.org/display/JPARSEC/SQL+parser+in+rparsec

    0 讨论(0)
  • 2021-01-05 02:48

    this is the svn tree for a sql parser based on Treetop

    0 讨论(0)
  • 2021-01-05 03:02

    Try the gda gem by tenderlove.

    RubyGems: https://rubygems.org/gems/gda

    Github: https://github.com/tenderlove/gda/

    0 讨论(0)
  • 2021-01-05 03:03

    I post answer here for someone who will need. I found this gem 'sql-parser'

    gem install sql-parser
    

    However this gem is not up-to-date if you install with command 'gem install'. So we have to check out the code from github also to get latest version. When I try to parse an insert statement after gem install. It failed.

    After updating code from github. it can parse.

    Github https://github.com/cryodex/sql-parser

    0 讨论(0)
提交回复
热议问题