sync up with sequel adapter from my Sequel fork until it's officially merged in
This commit is contained in:
parent
ad34357e57
commit
f4fb9e8034
@ -119,8 +119,11 @@ module Sequel
|
|||||||
# option is :select, yield the result of the query, otherwise
|
# option is :select, yield the result of the query, otherwise
|
||||||
# yield the connection if a block is given.
|
# yield the connection if a block is given.
|
||||||
def _execute(conn, sql, opts)
|
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
|
begin
|
||||||
r = log_yield(sql){conn.query(sql, :symbolize_keys => true)}
|
r = log_yield(sql){conn.query(sql, query_opts)}
|
||||||
if opts[:type] == :select
|
if opts[:type] == :select
|
||||||
yield r if r
|
yield r if r
|
||||||
elsif block_given?
|
elsif block_given?
|
||||||
|
Loading…
Reference in New Issue
Block a user