class Sequel::ADO::Dataset

  1. lib/sequel/adapters/ado.rb
Superclass: Dataset

Public Instance methods

fetch_rows(sql)
[show source]
    # File lib/sequel/adapters/ado.rb
246 def fetch_rows(sql)
247   execute(sql) do |recordset|
248     cols = []
249     conversion_procs = db.conversion_procs
250 
251     recordset.Fields.each do |field|
252       cols << [output_identifier(field.Name), conversion_procs[field.Type]]
253     end
254 
255     self.columns = cols.map(&:first)
256     return if recordset.EOF
257     max = cols.length
258 
259     recordset.GetRows.transpose.each do |field_values|
260       h = {}
261 
262       i = -1
263       while (i += 1) < max
264         name, cp = cols[i]
265         h[name] = if (v = field_values[i]) && cp
266           cp.call(v)
267         else
268           v
269         end
270       end
271       
272       yield h
273     end
274   end
275 end
provides_accurate_rows_matched?()

ADO can return for for delete and update statements, depending on the provider.

[show source]
    # File lib/sequel/adapters/ado.rb
278 def provides_accurate_rows_matched?
279   false
280 end