comparison pkg/controllers/surveys.go @ 1572:056a86b24be2

Made bottleneck primary key an int. Attention: This may break something!
author Sascha L. Teichmann <sascha.teichmann@intevation.de>
date Wed, 12 Dec 2018 19:21:02 +0100
parents 447db2bce052
children 8f6345ad5f13
comparison
equal deleted inserted replaced
1571:b3f2d43f43e4 1572:056a86b24be2
21 "gemma.intevation.de/gemma/pkg/models" 21 "gemma.intevation.de/gemma/pkg/models"
22 "github.com/gorilla/mux" 22 "github.com/gorilla/mux"
23 ) 23 )
24 24
25 const ( 25 const (
26 listSurveysSQL = `SELECT s.bottleneck_id, 26 listSurveysSQL = `
27 s.date_info::text 27 SELECT
28 FROM waterway.bottlenecks b, waterway.sounding_results s 28 s.bottleneck_id,
29 WHERE b.objnam=$1 AND s.bottleneck_id = b.bottleneck_id;` 29 s.date_info::text
30 FROM waterway.bottlenecks b JOIN waterway.sounding_results s
31 ON b.id = s.bottleneck_id
32 WHERE b.objnam=$1`
30 ) 33 )
31 34
32 func listSurveys( 35 func listSurveys(
33 _ interface{}, 36 _ interface{},
34 req *http.Request, 37 req *http.Request,