Class/Module Index [+]

Quicksearch

JdbcSpec::Oracle::Column

Public Class Methods

guess_date_or_time(value) click to toggle source
# File lib/jdbc_adapter/jdbc_oracle.rb, line 65
def self.guess_date_or_time(value)
  (value.hour == 0 && value.min == 0 && value.sec == 0) ?
  new_date(value.year, value.month, value.day) : value
end
string_to_time(string, klass) click to toggle source
# File lib/jdbc_adapter/jdbc_oracle.rb, line 60
def self.string_to_time(string, klass)
  time = klass.string_to_time(string)
  guess_date_or_time(time)
end

Public Instance Methods

type_cast(value) click to toggle source
# File lib/jdbc_adapter/jdbc_oracle.rb, line 43
def type_cast(value)
  return nil if value.nil?
  case type
  when :datetime then JdbcSpec::Oracle::Column.string_to_time(value, self.class)
  else
    super
  end
end
type_cast_code(var_name) click to toggle source
# File lib/jdbc_adapter/jdbc_oracle.rb, line 52
def type_cast_code(var_name)
  case type
  when :datetime  then "JdbcSpec::Oracle::Column.string_to_time(#{var_name}, self.class)"
  else
    super
  end
end

[Validate]

Generated with the Darkfish Rdoc Generator 2.