Module Sequel::JDBC::SQLServer::DatabaseMethods::MetadataDatasetMethods
In: lib/sequel/adapters/jdbc/sqlserver.rb

Work around a bug in SQL Server JDBC Driver 3.0, where the metadata for the getColumns result set specifies an incorrect type for the IS_AUTOINCREMENT column. The column is a string, but the type is specified as a short. This causes getObject() to throw a com.microsoft.sqlserver.jdbc.SQLServerException: "The conversion from char to SMALLINT is unsupported." Using getString() rather than getObject() for this column avoids the problem. Reference: social.msdn.microsoft.com/Forums/en/sqldataaccess/thread/20df12f3-d1bf-4526-9daa-239a83a8e435

Methods

Public Instance methods

[Source]

    # File lib/sequel/adapters/jdbc/sqlserver.rb, line 42
42:           def basic_type_convertor(map, meta, type, i)
43:             if output_identifier(meta.getColumnLabel(i)) == :is_autoincrement
44:               map[Java::JavaSQL::Types::VARCHAR]
45:             else
46:               super
47:             end
48:           end

[Source]

    # File lib/sequel/adapters/jdbc/sqlserver.rb, line 34
34:           def type_convertor(map, meta, type, i)
35:             if output_identifier(meta.getColumnLabel(i)) == :is_autoincrement
36:               map[Java::JavaSQL::Types::VARCHAR]
37:             else
38:               super
39:             end
40:           end

[Validate]