3 ms·
Maybe if there was better support at the connection layer, this might be better. If ActiveRecord (Rails) allowed you to pass a free-form ruby function and buil
by WrtCdEvrydy 10y ago
Maybe if there was better support at the connection layer, this might be better.
If ActiveRecord (Rails) allowed you to pass a free-form ruby function and built a procedure and executed it in SQL, I'd be all for it, but I'm not writing a one-off procedure and mantaining it.
- tomc1985 10y agoWhat is there to maintain? It's not hard to directly emit SQL to ActiveRecord
- WrtCdEvrydy 10y agoI'm not writing a one-off procedure in RAW SQL. If ActiveRecord could turn functions into SQL equivalents, it would be awesome.
- tomc1985 10y agoI know, they're so scary aren't they?
- WrtCdEvrydy 10y agoNo, in terms of Return on Investment, it just isn't worth it for me. Noone cares if a large query takes 10 seconds or 11 seconds with ActiveRecord enough to blow developer time on it.
- throwanem 10y agoNo one cares until they do, because the dataset's grown nontrivial and the crap 10s query Active Record generates is now a crap 120s query and one of the server, the client, or the user times out before it finishes.