Module: Sequel::JDBC::SQLServer

Defined in:
lib/sequel/adapters/jdbc/sqlserver.rb

Defined Under Namespace

Modules: DatabaseMethods

Class Method Summary collapse

Class Method Details

.MSSQLRubyTime(r, i) ⇒ Object



18
19
20
21
22
23
24
# File 'lib/sequel/adapters/jdbc/sqlserver.rb', line 18

def self.MSSQLRubyTime(r, i)
  # MSSQL-Server TIME should be fetched as string to keep the precision intact, see:
  # https://docs.microsoft.com/en-us/sql/t-sql/data-types/time-transact-sql#a-namebackwardcompatibilityfordownlevelclientsa-backward-compatibility-for-down-level-clients
  if v = r.getString(i)
    Sequel.string_to_time("#{v}")
  end
end