Skip to content

Commit 4138092

Browse files
committed
Propagate async keyword as in rails
1 parent 0377443 commit 4138092

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

lib/arjdbc/abstract/database_statements.rb

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -69,19 +69,19 @@ def exec_update(sql, name = nil, binds = NO_BINDS)
6969
end
7070
alias :exec_delete :exec_update
7171

72-
def execute(sql, name = nil)
72+
def execute(sql, name = nil, async: false)
7373
if preventing_writes? && write_query?(sql)
7474
raise ActiveRecord::ReadOnlyError, "Write query attempted while in readonly mode: #{sql}"
7575
end
7676

7777
materialize_transactions
7878
mark_transaction_written_if_write(sql)
7979

80-
log(sql, name) { @connection.execute(sql) }
80+
log(sql, name, async: async) { @connection.execute(sql) }
8181
end
8282

8383
# overridden to support legacy binds
84-
def select_all(arel, name = nil, binds = NO_BINDS, preparable: nil)
84+
def select_all(arel, name = nil, binds = NO_BINDS, preparable: nil, async: false)
8585
binds = convert_legacy_binds_to_attributes(binds) if binds.first.is_a?(Array)
8686
super
8787
end

0 commit comments

Comments
 (0)