Sha256: 8507d0c77df31ceccc4fb7a0aa9423c12111833bce679cddb6c01c21eb3d6f49

Contents?: true

Size: 1.67 KB

Versions: 8

Compression:

Stored size: 1.67 KB

Contents

class AutomobileMakeModelYearVariant < ActiveRecord::Base
  set_primary_key :row_hash
  
  # It looks like synthesizing a unique name would require including pretty much every column from the FEGs
  # (e.g. creeper gear, automatic vs automatic with lockup, feedback fuel system, etc.)
  # The advantages of not keying on row_hash is we could update variants to note whether they're hybrid or not and
  # it would let users specify variants. But my conclusion is that trying to do this won't be much of an improvement
  # because it will be a bunch of work to include all the columns and the names will be really long and obtuse
  # -Ian 10/18/2011
  
  col :row_hash
  col :make_name
  col :model_name
  col :year,         :type => :integer
  col :transmission
  col :speeds
  col :drive
  col :fuel_code
  col :cylinders,    :type => :integer
  col :displacement, :type => :float
  col :turbo,        :type => :boolean
  col :supercharger, :type => :boolean
  col :injection,    :type => :boolean
  col :fuel_efficiency,             :type => :float
  col :fuel_efficiency_units
  col :fuel_efficiency_city,        :type => :float
  col :fuel_efficiency_city_units
  col :fuel_efficiency_highway,     :type => :float
  col :fuel_efficiency_highway_units
  col :raw_fuel_efficiency_city,    :type => :float
  col :raw_fuel_efficiency_city_units
  col :raw_fuel_efficiency_highway, :type => :float
  col :raw_fuel_efficiency_highway_units
  col :carline_mfr_code,   :type => :integer
  col :vi_mfr_code,        :type => :integer
  col :carline_code,       :type => :integer
  col :carline_class_code, :type => :integer
  col :carline_class_name
  add_index :make_name
  add_index :model_name
  add_index :year
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
earth-0.11.7 lib/earth/automobile/automobile_make_model_year_variant.rb
earth-0.11.6 lib/earth/automobile/automobile_make_model_year_variant.rb
earth-0.11.5 lib/earth/automobile/automobile_make_model_year_variant.rb
earth-0.11.4 lib/earth/automobile/automobile_make_model_year_variant.rb
earth-0.11.3 lib/earth/automobile/automobile_make_model_year_variant.rb
earth-0.11.2 lib/earth/automobile/automobile_make_model_year_variant.rb
earth-0.11.1 lib/earth/automobile/automobile_make_model_year_variant.rb
earth-0.11.0 lib/earth/automobile/automobile_make_model_year_variant.rb