Sha256: 8c2f5c3f3fcde475d4f0f276d14a5506fca0899c9123b914362a737e30d23cfd

Contents?: true

Size: 1.36 KB

Versions: 4

Compression:

Stored size: 1.36 KB

Contents

class TestODBCStatement < DBDConfig.testbase(:odbc)
    def test_column_info
        sth = nil
        
        assert_nothing_raised do 
            sth = @dbh.prepare("select * from names")
            sth.execute
        end

        assert_kind_of Array, sth.column_info 
        assert_kind_of DBI::ColumnInfo, sth.column_info[0]
        assert_kind_of DBI::ColumnInfo, sth.column_info[1]
        # XXX odbc seems to have a problem with this every other edition of unixodbc or so.
        #     yes, I know this test is important.
#         assert_equal [
#             {
#                 :table=>"names", 
#                 :precision=>255, 
#                 :searchable=>true, 
#                 :name=>"name", 
#                 :unsigned=>true, 
#                 :length=>255, 
#                 :sql_type=>12, 
#                 :scale=>0, 
#                 :nullable=>true, 
#                 :type_name=>"VARCHAR"
#             },
#             {
#                 :table=>"names", 
#                 :precision=>10, 
#                 :searchable=>true, 
#                 :name=>"age", 
#                 :unsigned=>false, 
#                 :length=>4, 
#                 :sql_type=>4, 
#                 :scale=>0, 
#                 :nullable=>true, 
#                 :type_name=>"INTEGER"
#             }
#         ], sth.column_info

        sth.finish
    end
end

Version data entries

4 entries across 4 versions & 2 rubygems

Version Path
ydbi-0.6.0 test/dbd/odbc/test_statement.rb
ydbi-0.5.7 test/dbd/odbc/test_statement.rb
ydbi-0.5.0 test/dbd/odbc/test_statement.rb
dbd-odbc-0.2.5 test/dbd/odbc/test_statement.rb