开发者

Anyone know of a Ruby SQL parser?

开发者 https://www.devze.com 2022-12-23 12:05 出处:网络
Anyone 开发者_StackOverflow社区know of a Ruby SQL parser?Here\'s an example of a SQL parser done with rparsec:

Anyone 开发者_StackOverflow社区know of a Ruby SQL parser?


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

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


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


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


Try the gda gem by tenderlove.

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

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

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号