I'm using sqlite3 for the moment, and hence concatenation strings using the ||
operator.
At some later date I'd like to shift to MySQL, and hence it would be nice if no changes to the code had to be made. I'd normally use concat()
to concatenate in MySQL. Does ||
work too, or will I have to modify my code? Or is there any other solution?
I'm coding in Ruby on Rails 3.1, by the way.
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…