From f4fb9e803406de5e2d13b52b13960f1af77b5450 Mon Sep 17 00:00:00 2001 From: Brian Lopez Date: Thu, 5 Aug 2010 22:53:36 -0700 Subject: [PATCH] sync up with sequel adapter from my Sequel fork until it's officially merged in --- lib/sequel/adapters/mysql2.rb | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/lib/sequel/adapters/mysql2.rb b/lib/sequel/adapters/mysql2.rb index 2105cf9..89298b1 100644 --- a/lib/sequel/adapters/mysql2.rb +++ b/lib/sequel/adapters/mysql2.rb @@ -119,8 +119,11 @@ module Sequel # option is :select, yield the result of the query, otherwise # yield the connection if a block is given. def _execute(conn, sql, opts) + query_opts = {:symbolize_keys => true} + query_opts.merge!(:database_timezone => Sequel.database_timezone) if Sequel.respond_to?(:database_timezone) + query_opts.merge!(:application_timezone => Sequel.application_timezone) if Sequel.respond_to?(:application_timezone) begin - r = log_yield(sql){conn.query(sql, :symbolize_keys => true)} + r = log_yield(sql){conn.query(sql, query_opts)} if opts[:type] == :select yield r if r elsif block_given?