Thanks a lot for reply! I've tried mysql gem. But it doesn't allow 
expression like this
"(#{(['?'] * keys.size).join(',')})", *values"

it says mysql query method only allows one parameter.

-- 
Posted via http://www.ruby-forum.com/.