Sha256: 6dcfd8226353a84dbf865f185a6c121f493c02c9720992bc0838a775f805418e

Contents?: true

Size: 553 Bytes

Versions: 1

Compression:

Stored size: 553 Bytes

Contents

AircraftManufacturer.class_eval do
  data_miner do
    process "Start from scratch" do
      connection.drop_table table_name
    end
    
    schema Earth.database_options do
      string 'name'
    end
    
    process "Ensure Aircraft is populated" do
      Aircraft.run_data_miner!
    end
    
    process "Derive a list of aircraft manufacturers from aircraft" do
      INSERT_IGNORE %{INTO aircraft_manufacturers(name)
        SELECT aircraft.manufacturer_name FROM aircraft WHERE aircraft.manufacturer_name IS NOT NULL
      }
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
earth-0.5.0 lib/earth/air/aircraft_manufacturer/data_miner.rb