sql += "#{db_table}.#{db_field} IN (" +
             values.map { |val| "'#{connection.quote_string(val)}'" }.join(",") + ")"

      sql