SQL DSL runs to_sql on each element when it is instanciated. This means that you cannot pass a complex query around to multiple objects to let each object update it as it may because as soon as sql dsl instanciates a part of the statements it is converted into a string.
This is just code thats been sitting on my laptop for years, there is alot more work to do to make it a real realease. _
Add this line to your application's Gemfile:
gem 'sql_builder'
And then execute:
$ bundle
Or install it yourself as:
$ gem install sql_builder
TODO: Write usage instructions here
- Fork it
- Create your feature branch (
git checkout -b my-new-feature
) - Commit your changes (
git commit -am 'Added some feature'
) - Push to the branch (
git push origin my-new-feature
) - Create new Pull Request