Closed kbrock closed 8 years ago
r? @rafaelfranca
(@rails-bot has picked a reviewer for you, use r? to override)
It looks like #173 was closed, but not exactly sure why. Is it because this is not the right layer for this abstraction, or because that PR not support mysql?
Thanks
@rafaelfranca Does this look like something that could go into Arel?
thanks
Yes. It makes sense. Thank you for the pull request.
Hi All
String concatenation is database specific.
Postgres (and ANSI SQL) supports
column1 || column2
, but databases like mysql useconcat(column1, column2)
.This PR introduces string concatenation to Arel to abstract this nuance. e.g.:
table[:name].concat(other)
. Before this, developers needed to build database specific sql on their own.If Arel is not the right place for this abstraction, do you have any suggestions on how to abstract this in my own app?
Thanks, Keenan
/cc @fryguy @matthewd (and of course @tenderlove ) This is for ancestry, but I feel we want something similar in our spot as well.