Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Fixed anonymous columns

  • Loading branch information...
commit 8c07467e668767333882fe436b8305ef47854333 1 parent 2d157d9
Nusco+Beppe authored
Showing with 3 additions and 3 deletions.
  1. +1 −1  lib/sequel_core/adapters/ado.rb
  2. +2 −2 spec/adapters/ado_spec.rb
View
2  lib/sequel_core/adapters/ado.rb
@@ -59,7 +59,7 @@ def fetch_rows(sql, &block)
s = @db.execute sql
@columns = s.Fields.extend(Enumerable).map do |column|
- name = column.Name.empty? ? 'no column name' : column.Name
+ name = column.Name.empty? ? '(no column name)' : column.Name
name.to_sym
end
View
4 spec/adapters/ado_spec.rb
@@ -1,7 +1,7 @@
require File.join(File.dirname(__FILE__), 'spec_helper.rb')
unless defined?(ADO_DB)
- ADO_DB = Sequel.ado(:host => 'AZTEC', :database => 'Uno_test', :user => 'sa', :password => 'sadev')
+ ADO_DB = Sequel.ado(:host => 'MY_SQL_SERVER', :database => 'MyDB', :user => 'my_pwd', :password => 'my_usr')
end
context "An ADO dataset" do
@@ -23,7 +23,7 @@
specify "should assign a default name to anonymous columns" do
col = ADO_DB.fetch('SELECT COUNT(*) FROM items').columns[0]
- col.name.should == '(no column name)'
+ col.to_s.should == '(no column name)'
end
specify "should support counting" do
Please sign in to comment.
Something went wrong with that request. Please try again.