@@ -26,27 +26,29 @@ def make_xml_response(db, sql, point_id, func):
2626
2727 rs = []
2828 for si in sql :
29-
3029 records = db .execute (text (si ), {"point_id" : point_id })
3130 rs .append (records .fetchall ())
3231 return func (* rs )
3332
3433
3534def make_lithology_response (point_id , db ):
36- sql = " select * from NMA_view_NGWMN_Lithology where PointID=:point_id"
35+ sql = ' select * from " NMA_view_NGWMN_Lithology" where " PointID" =:point_id'
3736 return make_xml_response (db , sql , point_id , lithology_xml )
3837
3938
4039def make_well_construction_response (point_id , db ):
41- sql = " select * from NMA_view_NGWMN_WellConstruction where PointID=:point_id"
40+ sql = ' select * from " NMA_view_NGWMN_WellConstruction" where " PointID" =:point_id'
4241 return make_xml_response (db , sql , point_id , well_construction_xml )
4342
4443
4544def make_waterlevels_response (point_id , db ):
46- sql = "select * from dbo.view_NGWMN_WaterLevels where PointID=:point_id order by DateMeasured"
45+ sql = (
46+ 'select * from "NMA_view_NGWMN_WaterLevels" where "PointID"=:point_id '
47+ 'order by "DateMeasured"'
48+ )
4749 sql2 = (
48- " select * from NMA_WaterLevelsContinuous_Pressure_Daily where PointID=:point_id and QCed=1 order by "
49- "DateMeasured"
50+ ' select * from " NMA_WaterLevelsContinuous_Pressure_Daily" where " PointID" =:point_id and " QCed" is true '
51+ 'order by "DateMeasured"'
5052 )
5153
5254 return make_xml_response (db , (sql , sql2 ), point_id , water_levels_xml2 )
0 commit comments