added mysql2-gem support

pull/6827/head
Philipp Tessenow 14 years ago
parent 3cfffa0e61
commit c998d6aeab
  1. 2
      app/models/cost_query/query_utils.rb

@ -128,7 +128,7 @@ module CostQuery::QueryUtils
field = field_name_for(field, default_table) field = field_name_for(field, default_table)
"-- code specific for #{adapter_name}\n\t" << \ "-- code specific for #{adapter_name}\n\t" << \
case adapter_name case adapter_name
when :mysql when :mysql, :mysql2
"yearweek(#{field}, 1)" "yearweek(#{field}, 1)"
when :postgresql when :postgresql
"(EXTRACT(isoyear from #{field})*100 + \n\t\t" \ "(EXTRACT(isoyear from #{field})*100 + \n\t\t" \

Loading…
Cancel
Save