Permalink
Browse files

Fixed empty datasets in ADO adapter

  • Loading branch information...
1 parent cd4d373 commit 1c50939264f54cbdcf44283a55fc06a56e456158 unknown committed Jul 22, 2008
Showing with 6 additions and 3 deletions.
  1. +1 −1 Rakefile
  2. +4 −2 lib/sequel_core/adapters/ado.rb
  3. +1 −0 spec/spec_config.rb.example
View
@@ -127,7 +127,7 @@ Spec::Rake::SpecTask.new("integration") do |t|
t.spec_opts = spec_opts.call
end
-%w'postgres sqlite mysql informix oracle'.each do |adapter|
+%w'postgres sqlite mysql informix oracle ado'.each do |adapter|
desc "Run #{adapter} specs without coverage"
Spec::Rake::SpecTask.new("spec_#{adapter}") do |t|
t.spec_files = "spec/adapters/#{adapter}_spec.rb"
@@ -61,8 +61,10 @@ def fetch_rows(sql, &block)
@columns = s.Fields.extend(Enumerable).map {|x| x.Name.to_sym}
- s.moveFirst
- s.getRows.transpose.each {|r| yield hash_row(r)}
+ unless s.eof
+ s.moveFirst
+ s.getRows.transpose.each {|r| yield hash_row(r)}
+ end
end
self
end
@@ -7,3 +7,4 @@
# ORACLE_DB = Sequel.connect('oracle://hr:hr@localhost/XE')
# POSTGRES_URL = 'postgres://postgres:postgres@localhost:5432/reality_spec'
# SQLITE_DB = Sequel.connect('sqlite:/')
+# ADO_DB = Sequel.connect(:adapter => 'ado', :driver => "{Microsoft Access Driver (*.mdb)}; DBQ=c:\\Nwind.mdb")

0 comments on commit 1c50939

Please sign in to comment.