Mercurial > gemma
changeset 575:5484558e1b50
Fixed statements to insert bottlenecks.
author | Sascha L. Teichmann <sascha.teichmann@intevation.de> |
---|---|
date | Wed, 05 Sep 2018 18:11:50 +0200 |
parents | 18c007104106 |
children | d5626dd370a4 |
files | cmd/bottlenecks/main.go |
diffstat | 1 files changed, 8 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- a/cmd/bottlenecks/main.go Wed Sep 05 17:50:53 2018 +0200 +++ b/cmd/bottlenecks/main.go Wed Sep 05 18:11:50 2018 +0200 @@ -30,7 +30,7 @@ source_organization ) VALUES( $1, - $2, + isrs_fromText($2), $3, $4, isrsrange(isrs_fromText($5), isrs_fromText($6)), @@ -131,13 +131,17 @@ bn := bns[i] rb, lb := splitRBLB(bn.Rb_lb) - var limiting string + var limiting, country string if bn.Limiting_factor != nil { limiting = string(*bn.Limiting_factor) } - fmt.Printf("%s '%s' %s %s\n", bn.Fk_g_fid, bn.OBJNAM, rb, lb) + if bn.Responsible_country != nil { + country = string(*bn.Responsible_country) + } + + fmt.Printf("%s '%s' %s %s\n", bn.Fk_g_fid, bn.OBJNAM, bn.From_ISRS, bn.To_ISRS) if _, err := st.Exec( bn.Bottleneck_id, @@ -147,7 +151,7 @@ bn.From_ISRS, bn.To_ISRS, rb, lb, - bn.Responsible_country, + country, revisitingTime(bn.Revisiting_time), limiting, bn.Date_Info,