Commit f2e8eaf2 authored by Rune Åvar Ødegård's avatar Rune Åvar Ødegård
Browse files

Removed lower cases in insert SQLs

parent bcd26d86
......@@ -43,10 +43,10 @@ class NetworksPostHandler:
%(id)s,
%(name)s,
%(responsible_authority_id)s,
lower(%(organisational)s),
%(organisational)s,
%(begin_position)s,
%(end_position)s,
lower(%(aggregation_timezone)s)
%(aggregation_timezone)s
)
ON CONFLICT (id) DO UPDATE SET
name = %(name)s,
......@@ -54,6 +54,6 @@ class NetworksPostHandler:
organisational = %(organisational)s,
begin_position = %(begin_position)s,
end_position = %(end_position)s,
aggregation_timezone = lower(%(aggregation_timezone)s)
aggregation_timezone = %(aggregation_timezone)s
"""
Db.executemany(sql, model)
......@@ -92,45 +92,45 @@ class ProcessesPostHandler:
)
values (
%(id)s,
lower(%(measurement_type)s),
lower(%(measurement_method)s),
lower(%(other_measurement_method)s),
lower(%(sampling_method)s),
lower( %(other_sampling_method)s),
lower(%(analytical_tech)s),
lower(%(sampling_equipment)s),
lower(%(measurement_equipment)s),
lower(%(equiv_demonstration)s),
lower(%(equiv_demonstration_report)s),
%(measurement_type)s,
%(measurement_method)s,
%(other_measurement_method)s,
%(sampling_method)s,
%(other_sampling_method)s,
%(analytical_tech)s,
%(sampling_equipment)s,
%(measurement_equipment)s,
%(equiv_demonstration)s,
%(equiv_demonstration_report)s,
%(detection_limit)s,
lower(%(detection_limit_uom)s),
%(detection_limit_uom)s,
%(documentation)s,
%(qa_report)s,
%(duration_number)s,
%(duration_unit)s,
%(cadence_number)s,
lower(%(cadence_unit)s),
%(cadence_unit)s,
%(responsible_authority_id)s
)
ON CONFLICT (id) DO UPDATE SET
measurement_type = lower(%(measurement_type)s),
measurement_method =lower( %(measurement_method)s),
other_measurement_method = lower(%(other_measurement_method)s),
sampling_method = lower(%(sampling_method)s),
other_sampling_method = lower(%(other_sampling_method)s),
analytical_tech = lower(%(analytical_tech)s),
sampling_equipment = lower(%(sampling_equipment)s),
measurement_equipment =lower( %(measurement_equipment)s),
equiv_demonstration = lower(%(equiv_demonstration)s),
equiv_demonstration_report = lower(%(equiv_demonstration_report)s),
measurement_type = %(measurement_type)s,
measurement_method = %(measurement_method)s,
other_measurement_method = %(other_measurement_method)s,
sampling_method = %(sampling_method)s,
other_sampling_method = %(other_sampling_method)s,
analytical_tech = %(analytical_tech)s,
sampling_equipment = %(sampling_equipment)s,
measurement_equipment = %(measurement_equipment)s,
equiv_demonstration = %(equiv_demonstration)s,
equiv_demonstration_report = %(equiv_demonstration_report)s,
detection_limit = %(detection_limit)s,
detection_limit_uom = lower(%(detection_limit_uom)s),
detection_limit_uom = %(detection_limit_uom)s,
documentation = %(documentation)s,
qa_report = %(qa_report)s,
duration_number = %(duration_number)s,
duration_unit = %(duration_unit)s,
cadence_number = %(cadence_number)s,
cadence_unit = lower(%(cadence_unit)s),
responsible_authority_id = lower(%(responsible_authority_id)s)
cadence_unit = %(cadence_unit)s,
responsible_authority_id = %(responsible_authority_id)s
"""
Db.executemany(sql, model)
......@@ -43,10 +43,10 @@ class SamplingPointsPostHandler:
)
values (
%(id)s,
lower(%(assessment_type)s),
%(assessment_type)s,
%(station_id)s,
lower(%(station_classification)s),
lower(%(main_emission_sources)s),
%(station_classification)s,
%(main_emission_sources)s,
%(traffic_emissions)s,
%(heating_emissions)s,
%(industrial_emissions)s,
......@@ -56,10 +56,10 @@ class SamplingPointsPostHandler:
%(mobile)s
)
ON CONFLICT (id) DO UPDATE SET
assessment_type = lower(%(assessment_type)s),
assessment_type = %(assessment_type)s,
station_id = %(station_id)s,
station_classification = lower(%(station_classification)s),
main_emission_sources = lower(%(main_emission_sources)s),
station_classification = %(station_classification)s,
main_emission_sources = %(main_emission_sources)s,
traffic_emissions = %(traffic_emissions)s,
heating_emissions = %(heating_emissions)s,
industrial_emissions = %(industrial_emissions)s,
......
......@@ -72,7 +72,7 @@ class StationsPostHandler:
%(network_id)s,
%(national_station_code)s,
%(mobile)s,
lower(%(area_classification)s),
%(area_classification)s,
%(distance_junction)s,
%(traffic_volume)s,
%(heavy_duty_fraction)s,
......@@ -89,7 +89,7 @@ class StationsPostHandler:
network_id = %(network_id)s,
national_station_code = %(national_station_code)s,
mobile = %(mobile)s,
area_classification = lower(%(area_classification)s),
area_classification = %(area_classification)s,
distance_junction = %(distance_junction)s,
traffic_volume = %(traffic_volume)s,
heavy_duty_fraction = %(heavy_duty_fraction)s,
......
......@@ -94,7 +94,7 @@
<b>Measurement Equipment</b>
<br />
<l-select
v-model="editObj.measurement_equipments"
v-model="editObj.measurement_equipment"
class="text-xs"
:data="measurementequipments"
:multiple="false"
......
......@@ -25,11 +25,7 @@
<hot-column title="sampling_equipment" data="sampling_equipment" read-only="true"></hot-column>
<hot-column title="measurement_equipment" data="measurement_equipment_name" read-only="true"></hot-column>
<hot-column title="equiv_demonstration" data="equiv_demonstration_name" read-only="true"></hot-column>
<hot-column
title="equiv_demonstration_report"
data="equiv_demonstration_report"
read-only="true"
></hot-column>
<hot-column title="equiv_demonstration_report" data="equiv_demonstration_report" read-only="true"></hot-column>
<hot-column title="detection_limit" data="detection_limit" read-only="true"></hot-column>
<hot-column title="detection_limit_uom" data="detection_limit_uom_name" read-only="true"></hot-column>
<hot-column title="uncertainty_estimate" data="uncertainty_estimate" read-only="true"></hot-column>
......@@ -40,11 +36,7 @@
<hot-column title="cadence_number" data="cadence_number" read-only="true"></hot-column>
<hot-column title="cadence_unit" data="cadence_unit_name" read-only="true"></hot-column>
<hot-column title="responsible_authority_id" data="responsible_authority" read-only="true"></hot-column>
<hot-column
title="other_measurement_equipment"
data="other_measurement_equipment"
read-only="true"
></hot-column>
<hot-column title="other_measurement_equipment" data="other_measurement_equipment" read-only="true"></hot-column>
<hot-column title="other_sampling_equipment" data="other_sampling_equipment" read-only="true"></hot-column>
</hot-table>
<l-l-edit
......@@ -86,7 +78,7 @@ export default {
components: {
HotTable,
HotColumn,
LInput,
LInput,s
LButton,
LInfoBox,
LLEdit,
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment