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