Top Level Namespace

Defined Under Namespace

Modules: Earth Classes: AirConditionerUse, Aircraft, AircraftClass, AircraftManufacturer, Airline, Airport, AutomobileFuel, AutomobileMake, AutomobileMakeFleetYear, AutomobileMakeModel, AutomobileMakeModelYear, AutomobileMakeModelYearVariant, AutomobileMakeYear, AutomobileSizeClass, AutomobileSizeClassYear, AutomobileTypeFuelAge, AutomobileTypeFuelControl, AutomobileTypeFuelYear, AutomobileTypeFuelYearAge, AutomobileTypeFuelYearControl, AutomobileTypeYear, Breed, BreedGender, BusClass, BusFuel, BusFuelControl, BusFuelYearControl, Carrier, CarrierMode, CensusDivision, CensusRegion, ClimateDivision, ClothesMachineUse, ComputationCarrier, ComputationCarrierInstanceClass, ComputationCarrierRegion, Country, DietClass, DishwasherUse, EgridRegion, EgridSubregion, FlightDistanceClass, FlightFuelType, FlightSeatClass, FlightSegment, FoodGroup, Fuel, FuelPrice, FuelType, FuelYear, Gender, GreenhouseGas, Industry, IndustryProduct, IndustryProductLine, IndustrySector, LodgingClass, Merchant, MerchantCategory, MerchantCategoryIndustry, PetroleumAdministrationForDefenseDistrict, ProductLine, ProductLineIndustryProduct, RailClass, ResidenceAppliance, ResidenceClass, ResidenceFuelPrice, ResidenceFuelType, ResidentialEnergyConsumptionSurveyResponse, Sector, ShipmentMode, Species, State, Urbanity, ZipCode

Instance Method Summary collapse

Instance Method Details

#INSERT_IGNORE(cmd) ⇒ Object



145
146
147
148
149
150
151
152
# File 'lib/earth.rb', line 145

def INSERT_IGNORE(cmd)
  if ActiveRecord::Base.connection.adapter_name.downcase == 'sqlite'
    prefix = 'INSERT'
  else
    prefix = 'INSERT IGNORE'
  end
  ActiveRecord::Base.connection.execute "#{prefix} #{cmd}"
end