@@ -78,18 +78,6 @@ def exec_update(sql, name = 'SQL', binds = NO_BINDS)
7878 end
7979 alias :exec_delete :exec_update
8080
81- def execute ( sql , name = nil , async : false , allow_retry : false , materialize_transactions : true )
82- sql = transform_query ( sql )
83-
84- if preventing_writes? && write_query? ( sql )
85- raise ActiveRecord ::ReadOnlyError , "Write query attempted while in readonly mode: #{ sql } "
86- end
87-
88- mark_transaction_written_if_write ( sql )
89-
90- raw_execute ( sql , name , async : async , allow_retry : allow_retry , materialize_transactions : materialize_transactions )
91- end
92-
9381 # overridden to support legacy binds
9482 def select_all ( arel , name = nil , binds = NO_BINDS , preparable : nil , async : false )
9583 binds = convert_legacy_binds_to_attributes ( binds ) if binds . first . is_a? ( Array )
@@ -107,7 +95,9 @@ def convert_legacy_binds_to_attributes(binds)
10795 def raw_execute ( sql , name , async : false , allow_retry : false , materialize_transactions : true )
10896 log ( sql , name , async : async ) do
10997 with_raw_connection ( allow_retry : allow_retry , materialize_transactions : materialize_transactions ) do |conn |
110- conn . execute ( sql )
98+ result = conn . execute ( sql )
99+ verified!
100+ result
111101 end
112102 end
113103 end
0 commit comments