# HG changeset patch
# User mschaefer
# Date 1571050507 -7200
# Node ID ad852be69900cffbfc9f012b750b95467b456f4b
# Parent 07f02019065ebefd09cb83f92d1606bd02dea983
Nachtrag Pos. 20: improved infrastructure query
diff -r 07f02019065e -r ad852be69900 artifacts/doc/conf/meta-data.xml
--- a/artifacts/doc/conf/meta-data.xml Mon Oct 14 08:14:58 2019 +0200
+++ b/artifacts/doc/conf/meta-data.xml Mon Oct 14 12:55:07 2019 +0200
@@ -1417,24 +1417,30 @@
-
-
-
-
+
+
+
+
+
-
-
+
+
+
+
+
-
-
-
-
-
+
+
+
@@ -1450,6 +1456,25 @@
+
+ die expansion von infra_rs_clause funktioniert nicht richtig, die messages erscheinen leider nicht im log...
+ infrastructures_statement.infra_rs_clause: $infra_rs_clause
+ infrastructures_statement.infra_rs_clause: ${infra_rs_clause}
+
+ SELECT s.id, MIN(s.filename) AS filename, MIN(s.group_id) AS group_id, MIN(g.name) AS group_label,
+ MIN(s.annotation_type_id) AS type_id, MIN(t.name) AS type_label
+ FROM (((infrastructure AS s INNER JOIN infrastructure_values AS v ON v.infrastructure_id = s.id)
+ INNER JOIN annotation_types AS g ON s.group_id = g.id)
+ INNER JOIN annotation_types AS t ON s.annotation_type_id = t.id)
+ INNER JOIN attributes AS rs ON v.attribute_id = rs.id
+ WHERE (s.river_id = ${river_id})
+ AND (v.station BETWEEN ${fromkm}-0.0001 AND ${tokm}+0.0001)
+ ${infra_rs_clause}
+ GROUP BY s.id
+ ORDER BY MIN(g.name), MIN(t.name)
+
+
+
SELECT s.id, MIN(s.filename) AS filename, MIN(s.group_id) AS group_id, MIN(g.name) AS group_label,