aboutsummaryrefslogtreecommitdiffstats
path: root/lib/arel/collectors/substitute_binds.rb
Commit message (Collapse)AuthorAgeFilesLines
* Refactor `substitute_binds` to perform substitution immediatelySean Griffin2017-07-211-19/+10
| | | | | | | | | | | | | | | | | | I'm honestly not sure if replacing bind params with their concrete values is something that belongs in Arel at all, as it's something that will need to be coupled to the quoting mechanism of the caller, and could just be accomplished by using `Quoted` instead. Still, with the new structure we can provide a much simpler API around substitution. The expectation of the quoter responding to `quote` is a reasonably minimal API. I originally used `DelegateClass` here, with the one line override of `add_bind`, but realized that we have some funky code going on where the collector returns the next collector to use (in practice `self` is always returned, and I don't see why we'd ever want to do this). Removing that would likely be worthwhile, but would be a larger refactoring
* Rename `Collectors::Bind`Sean Griffin2017-07-211-0/+37
The "bind collector" does not actually collect bind params at all, it substitutes them out of the final AST, replacing them with a quoted value.