Sha256: bed331a9d4ef45acf6fe3a0fa01d4515543816e2c897292247f06084c1095107

Contents?: true

Size: 558 Bytes

Versions: 29

Compression:

Stored size: 558 Bytes

Contents

ResidenceClass.class_eval do
  data_miner do
    schema do
      string :name
    end

    process "derive from ResidentialEnergyConsumptionSurveyResponse" do
      ResidentialEnergyConsumptionSurveyResponse.run_data_miner!
      connection.execute %{
        INSERT IGNORE INTO residence_classes(name)
        SELECT DISTINCT residential_energy_consumption_survey_responses.residence_class_id FROM residential_energy_consumption_survey_responses WHERE LENGTH(residential_energy_consumption_survey_responses.residence_class_id) > 0
      }
    end
  end
end

Version data entries

29 entries across 29 versions & 2 rubygems

Version Path
earth-0.2.5 lib/earth/residence/residence_class/data_miner.rb
earth-0.2.4 lib/earth/residence/residence_class/data_miner.rb
earth-ruby19-0.2.3 lib/earth/residence/residence_class/data_miner.rb
earth-0.2.3 lib/earth/residence/residence_class/data_miner.rb
earth-0.2.2 lib/earth/residence/residence_class/data_miner.rb
earth-0.2.1 lib/earth/residence/residence_class/data_miner.rb
earth-0.2.0 lib/earth/residence/residence_class/data_miner.rb
earth-0.1.4 lib/earth/residence/residence_class/data_miner.rb
earth-0.1.3 lib/earth/residence/residence_class/data_miner.rb