Query to use to get the number of rows affected by an update or delete query.
Just execute so it doesn’t attempt to return the number of rows modified.
# File lib/sequel/adapters/ado/mssql.rb, line 15 15: def execute_ddl(sql, opts={}) 16: execute(sql, opts) 17: end
Issue a separate query to get the rows modified. ADO appears to use pass by reference with an integer variable, which is obviously not supported directly in ruby, and I’m not aware of a workaround.
# File lib/sequel/adapters/ado/mssql.rb, line 23 23: def execute_dui(sql, opts={}) 24: return super unless @opts[:provider] 25: synchronize(opts[:server]) do |conn| 26: begin 27: log_yield(sql){conn.Execute(sql)} 28: res = log_yield(ROWS_AFFECTED){conn.Execute(ROWS_AFFECTED)} 29: res.getRows.transpose.each{|r| return r.shift} 30: rescue ::WIN32OLERuntimeError => e 31: raise_error(e) 32: end 33: end 34: end
The ADO adapter’s default provider doesn’t support transactions, since it creates a new native connection for each query. So Sequel only attempts to use transactions if an explicit :provider is given.
# File lib/sequel/adapters/ado/mssql.rb, line 41 41: def begin_transaction(conn, opts={}) 42: super if @opts[:provider] 43: end
Disabled; run with --debug to generate this.
Generated with the Darkfish Rdoc Generator 1.1.6.