Class/Module Index [+]

Quicksearch

JdbcSpec::Derby::Column

Public Instance Methods

default_value(value) click to toggle source

Post process default value from JDBC into a Rails-friendly format (columns{-internal})

# File lib/jdbc_adapter/jdbc_derby.rb, line 59
def default_value(value)
  # jdbc returns column default strings with actual single quotes around the value.
  return $1 if value =~ /^'(.*)'$/

  value
end
simplified_type(field_type) click to toggle source
# File lib/jdbc_adapter/jdbc_derby.rb, line 52
def simplified_type(field_type)
  return :boolean if field_type =~ /smallint/
  return :float if field_type =~ /real/
  super
end

[Validate]

Generated with the Darkfish Rdoc Generator 2.