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.1.2 lib/earth/air/flight_propulsion.rb
earth-0.1.1 lib/earth/air/flight_propulsion.rb
earth-0.1.0 lib/earth/air/flight_propulsion.rb
earth-0.0.43 lib/earth/air/flight_propulsion.rb
earth-0.0.42 lib/earth/air/flight_propulsion.rb
earth-0.0.41 lib/earth/air/flight_propulsion.rb
earth-0.0.40 lib/earth/air/flight_propulsion.rb
earth-0.0.39 lib/earth/air/flight_propulsion.rb
earth-0.0.38 lib/earth/air/flight_propulsion.rb
earth-0.0.37 lib/earth/air/flight_propulsion.rb
earth-0.0.36 lib/earth/air/flight_propulsion.rb
earth-0.0.35 lib/earth/air/flight_propulsion.rb
earth-0.0.34 lib/earth/air/flight_propulsion.rb
earth-0.0.33 lib/earth/air/flight_propulsion.rb
earth-0.0.32 lib/earth/air/flight_propulsion.rb
earth-0.0.31 lib/earth/air/flight_propulsion.rb
earth-0.0.30 lib/earth/air/flight_propulsion.rb
earth-0.0.29 lib/earth/air/flight_propulsion.rb
earth-0.0.28 lib/earth/air/flight_propulsion.rb
earth-0.0.27 lib/earth/air/flight_propulsion.rb