3 ms·
In practice, I'd reduce this to a query building function in my own code, so the readability would be much better. The benefit is that you don't need to include
by mbreese 12y ago
In practice, I'd reduce this to a query building function in my own code, so the readability would be much better. The benefit is that you don't need to include another library for it to work. Well, that and it is a strategy that works for all languages, not just Ruby.
- scott_s 12y agoAnd the downside is now you need to spend effort maintaing and debugging your custom query builder.
- IanCal 12y agoYeah but a lot of it is quite generic, so could be reused in a few places and therefore make that extra effort worthwhile. In fact, it might be handy in a few places so you could package it up and then have a single place you have to maintain the query building code for several projects. Wait a minute...
- mbreese 12y agoI think you're over estimating the amount of effort that I spend on this.