Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

sql_tools

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

sql_tools

  • 0.2.2
  • Rubygems
  • Socket score

Version published
Maintainers
1
Created
Source

SqlTools

SqlTools is a collection of tools for working with SQL ASTs. It's the intersection of ruby_tree_sitter & tree-sitter-sql, letting you parse SQL queries and transform them into semantic Ruby objects.

Installation

If you're having trouble installing ruby_tree_sitter try installing the libraries for the latest supported version of libtree-sitter.

git clone https://github.com/tree-sitter/tree-sitter
cd tree-sitter
git checkout tags/v0.22.6
make
sudo make install

To install the SQL parser run the rake task.

bundle exec rake treesitter:install

Usage

SqlTools.query_from_sql(<<~SQL)
  SELECT id, name
  FROM table_a
  WHERE id > 10
    AND id < 20
SQL

Development

After checking out the repo, run bin/setup to install dependencies. You can also run bin/console for an interactive prompt that will allow you to experiment.

Contributing

Bug reports and pull requests are welcome on GitHub at https://github.com/DerekStride/sql_tools. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the code of conduct.

License

The gem is available as open source under the terms of the MIT License.

Code of Conduct

Everyone interacting in the SqlTools project's codebases, issue trackers, chat rooms and mailing lists is expected to follow the code of conduct.

FAQs

Package last updated on 04 Jul 2024

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc