Add string concatenation support. #173

Closed
wants to merge 1 commit into
from

Conversation

Projects
None yet
2 participants

This PR adds an infix operator ||. I didn't find any tests for specific
infix operators, so I didn't write any.

Collaborator

ernie commented Mar 14, 2013

@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, 4.2.2.1.

Collaborator

ernie commented Mar 14, 2013

@whitequark it's SQL-92 but not supported by all db engines (read, LOL MYSQL)

Collaborator

ernie commented Mar 14, 2013

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?

Collaborator

ernie commented Mar 14, 2013

@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)

Collaborator

ernie commented Mar 14, 2013

Sorry :(

@ernie ernie closed this Mar 14, 2013

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment