Sha256: d74b378a6408b1d8f68cafecae003286cdba80c1e32685f5037e05894db7079d

Contents?: true

Size: 540 Bytes

Versions: 28

Compression:

Stored size: 540 Bytes

Contents

class FlightPropulsion < ActiveRecord::Base
  set_primary_key :name
  
  data_miner do
    schema do
      string 'name'
      string 'bts_aircraft_group_code'
    end
    
    process "derive from flight segments" do
      FlightSegment.run_data_miner!
      connection.execute %{
        INSERT IGNORE INTO flight_propulsions(name, bts_aircraft_group_code)
        SELECT flight_segments.propulsion_id, flight_segments.bts_aircraft_group_code FROM flight_segments WHERE LENGTH(flight_segments.propulsion_id) > 0
      }
    end
  end
end

Version data entries

28 entries across 28 versions & 1 rubygems

Version Path
earth-0.0.26 lib/earth/air/flight_propulsion.rb
earth-0.0.24 lib/earth/air/flight_propulsion.rb
earth-0.0.23 lib/earth/air/flight_propulsion.rb
earth-0.0.22 lib/earth/air/flight_propulsion.rb
earth-0.0.21 lib/earth/air/flight_propulsion.rb
earth-0.0.20 lib/earth/air/flight_propulsion.rb
earth-0.0.19 lib/earth/air/flight_propulsion.rb
earth-0.0.18 lib/earth/air/flight_propulsion.rb