Sha256: 5e1ccf49c20ad76dc7bfb55700e132da76db4df5075d4e1aa7c7ee7e8459d681

Contents?: true

Size: 532 Bytes

Versions: 1

Compression:

Stored size: 532 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 "Derive a list of aircraft manufacturers from aircraft" do
      Aircraft.run_data_miner!
      connection.execute %{
        INSERT IGNORE INTO aircraft_manufacturers(name)
        SELECT aircraft.icao_manufacturer_name FROM aircraft WHERE aircraft.icao_manufacturer_name IS NOT NULL
      }
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

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