Skip to content

Add string concatenation support. #173

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from
Closed

Add string concatenation support. #173

wants to merge 1 commit into from

Conversation

whitequark
Copy link

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

@ernie
Copy link
Collaborator

ernie commented Mar 14, 2013

@whitequark This is db-specific -- better to use the existing support for infix operations.

@whitequark
Copy link
Author

@ernie Could you elaborate? I believe the || operator is SQL-92, 4.2.2.1.

@ernie
Copy link
Collaborator

ernie commented Mar 14, 2013

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

@ernie
Copy link
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.

@whitequark
Copy link
Author

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

@ernie
Copy link
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.

@whitequark
Copy link
Author

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

@ernie
Copy link
Collaborator

ernie commented Mar 14, 2013

Sorry :(

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

Successfully merging this pull request may close these issues.

2 participants