module Sequel::JDBC::SQLServer::DatabaseMethods

  1. lib/sequel/adapters/jdbc/sqlserver.rb

Methods

Public Instance

  1. setup_type_convertor_map

Public Instance methods

setup_type_convertor_map()
[show source]
   # File lib/sequel/adapters/jdbc/sqlserver.rb
30 def setup_type_convertor_map
31   super
32   map = @type_convertor_map
33   map[Java::JavaSQL::Types::TIME] = MSSQL_RUBY_TIME
34 
35   # Work around constant lazy loading in some drivers
36   begin
37     dto = Java::MicrosoftSql::Types::DATETIMEOFFSET
38   rescue NameError
39   end
40 
41   if dto
42     map[dto] = lambda do |r, i|
43       if v = r.getDateTimeOffset(i)
44         to_application_timestamp(v.to_s)
45       end
46     end
47   end
48 end