Sha256: 084573a5851e71fb6561b16db099752f6adf5d9a53454542ea0bedb33cfb5d10

Contents?: true

Size: 495 Bytes

Versions: 11

Compression:

Stored size: 495 Bytes

Contents

FlightService.class_eval do
  data_miner do
    schema do
      string 'name'
      string 'bts_service_class_code'
    end
  
    process "derive from flight segments" do
      FlightSegment.run_data_miner!
      connection.execute %{
        INSERT IGNORE INTO flight_services(name, bts_service_class_code)
        SELECT flight_segments.service_class_id, flight_segments.bts_service_class_code FROM flight_segments WHERE LENGTH(flight_segments.service_class_id) > 0
      }
    end
  end
end

Version data entries

11 entries across 11 versions & 2 rubygems

Version Path
earth-0.2.7 lib/earth/air/flight_service/data_miner.rb
earth-0.2.6 lib/earth/air/flight_service/data_miner.rb
earth-0.2.5 lib/earth/air/flight_service/data_miner.rb
earth-0.2.4 lib/earth/air/flight_service/data_miner.rb
earth-ruby19-0.2.3 lib/earth/air/flight_service/data_miner.rb
earth-0.2.3 lib/earth/air/flight_service/data_miner.rb
earth-0.2.2 lib/earth/air/flight_service/data_miner.rb
earth-0.2.1 lib/earth/air/flight_service/data_miner.rb
earth-0.2.0 lib/earth/air/flight_service/data_miner.rb
earth-0.1.4 lib/earth/air/flight_service/data_miner.rb
earth-0.1.3 lib/earth/air/flight_service/data_miner.rb