| 1167 | }; |
| 1168 | |
| 1169 | boost::optional<EnvironmentType> SqlFile_Impl::environmentType(const std::string& envPeriod) const { |
| 1170 | boost::optional<EnvironmentType> result; |
| 1171 | std::string query = "SELECT EnvironmentType FROM environmentperiods WHERE EnvironmentName=? COLLATE NOCASE"; |
| 1172 | boost::optional<int> temp = execAndReturnFirstInt(query, envPeriod); |
| 1173 | if (temp) { |
| 1174 | try { |
| 1175 | result = EnvironmentType(*temp); |
| 1176 | } catch (...) { |
| 1177 | LOG(Error, "Could not convert integer value " << *temp << " to EnvironmentType"); |
| 1178 | } |
| 1179 | } |
| 1180 | return result; |
| 1181 | } |
| 1182 | |
| 1183 | OptionalDouble SqlFile_Impl::economicsEnergyCost() const { |
| 1184 | return execAndReturnFirstDouble( |
nothing calls this directly
no test coverage detected