GitHub is home to over 20 million developers working together to host and review code, manage projects, and build software together.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
Already on GitHub? Sign in to your account
This PR adds an infix operator ||. I didn't find any tests for specific
infix operators, so I didn't write any.
Add string concatenation support.
@whitequark This is db-specific -- better to use the existing support for infix operations.
@ernie Could you elaborate? I believe the || operator is SQL-92, 22.214.171.124.
@whitequark it's SQL-92 but not supported by all db engines (read, LOL MYSQL)
In any case, since ARel already supports all manner of infix operations without this patch, I'm not sure I see the point in adding a specific implementation for concat.
@ernie I see. Am I correct that you are suggesting to manually create the relevant nodes, and are opposed to the shortcut (like for arithmetic operations) because || is not supported by MySQL?
@whitequark Partly. Also because I'm not really sure concatenation is in the same category as the stuff in Arel::Math.
@ernie Well I guess that counts as a reason. Feel free to close the PR or delegate it to an arel maintainer (not sure if you are one)