diff options
author | Rafael França <rafaelmfranca@gmail.com> | 2016-01-06 00:32:10 -0200 |
---|---|---|
committer | Rafael França <rafaelmfranca@gmail.com> | 2016-01-06 00:32:10 -0200 |
commit | ffc4b8e93af4356110c7a2573cc3340145baa02b (patch) | |
tree | e19640d2eabfeabad80c61a95a589a8b42d56703 /lib/arel/visitors/mysql.rb | |
parent | dfd22638c2773d843ea1d2e56992a6ac355b3ecb (diff) | |
parent | 83c47c1962827698eb0ed58d191f121cedf89385 (diff) | |
download | rails-ffc4b8e93af4356110c7a2573cc3340145baa02b.tar.gz rails-ffc4b8e93af4356110c7a2573cc3340145baa02b.tar.bz2 rails-ffc4b8e93af4356110c7a2573cc3340145baa02b.zip |
Merge pull request #410 from kbrock/concat
Add database specific string concatenation
Diffstat (limited to 'lib/arel/visitors/mysql.rb')
-rw-r--r-- | lib/arel/visitors/mysql.rb | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/lib/arel/visitors/mysql.rb b/lib/arel/visitors/mysql.rb index 724e0fc43e..ac3ad7b470 100644 --- a/lib/arel/visitors/mysql.rb +++ b/lib/arel/visitors/mysql.rb @@ -72,6 +72,14 @@ module Arel maybe_visit o.limit, collector end + def visit_Arel_Nodes_Concat o, collector + collector << " CONCAT(" + visit o.left, collector + collector << ", " + visit o.right, collector + collector << ") " + collector + end end end end |