Mercurial > gemma
annotate pkg/imports/dsr.go @ 5413:99f32f0dc70c marking-single-beam
Added tools to classify vertices by their heights with class breaks.
author | Sascha L. Teichmann <sascha.teichmann@intevation.de> |
---|---|
date | Wed, 07 Jul 2021 11:42:25 +0200 |
parents | 7bd9c5161836 |
children | f2204f91d286 |
rev | line source |
---|---|
4950
427f87ac96d6
One more header line.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
4852
diff
changeset
|
1 // This is Free Software under GNU Affero General Public License v >= 3.0 |
4392
024b16a1c253
Implemented deletion of stretches.
Sascha Wilde <wilde@intevation.de>
parents:
diff
changeset
|
2 // without warranty, see README.md and license for details. |
024b16a1c253
Implemented deletion of stretches.
Sascha Wilde <wilde@intevation.de>
parents:
diff
changeset
|
3 // |
024b16a1c253
Implemented deletion of stretches.
Sascha Wilde <wilde@intevation.de>
parents:
diff
changeset
|
4 // SPDX-License-Identifier: AGPL-3.0-or-later |
024b16a1c253
Implemented deletion of stretches.
Sascha Wilde <wilde@intevation.de>
parents:
diff
changeset
|
5 // License-Filename: LICENSES/AGPL-3.0.txt |
024b16a1c253
Implemented deletion of stretches.
Sascha Wilde <wilde@intevation.de>
parents:
diff
changeset
|
6 // |
024b16a1c253
Implemented deletion of stretches.
Sascha Wilde <wilde@intevation.de>
parents:
diff
changeset
|
7 // Copyright (C) 2019 by via donau |
024b16a1c253
Implemented deletion of stretches.
Sascha Wilde <wilde@intevation.de>
parents:
diff
changeset
|
8 // – Österreichische Wasserstraßen-Gesellschaft mbH |
024b16a1c253
Implemented deletion of stretches.
Sascha Wilde <wilde@intevation.de>
parents:
diff
changeset
|
9 // Software engineering by Intevation GmbH |
024b16a1c253
Implemented deletion of stretches.
Sascha Wilde <wilde@intevation.de>
parents:
diff
changeset
|
10 // |
024b16a1c253
Implemented deletion of stretches.
Sascha Wilde <wilde@intevation.de>
parents:
diff
changeset
|
11 // Author(s): |
024b16a1c253
Implemented deletion of stretches.
Sascha Wilde <wilde@intevation.de>
parents:
diff
changeset
|
12 // * Sascha L. Teichmann <sascha.teichmann@intevation.de> |
024b16a1c253
Implemented deletion of stretches.
Sascha Wilde <wilde@intevation.de>
parents:
diff
changeset
|
13 // * Sascha Wilde <wilde@intevation.de> |
024b16a1c253
Implemented deletion of stretches.
Sascha Wilde <wilde@intevation.de>
parents:
diff
changeset
|
14 |
024b16a1c253
Implemented deletion of stretches.
Sascha Wilde <wilde@intevation.de>
parents:
diff
changeset
|
15 package imports |
024b16a1c253
Implemented deletion of stretches.
Sascha Wilde <wilde@intevation.de>
parents:
diff
changeset
|
16 |
024b16a1c253
Implemented deletion of stretches.
Sascha Wilde <wilde@intevation.de>
parents:
diff
changeset
|
17 import ( |
024b16a1c253
Implemented deletion of stretches.
Sascha Wilde <wilde@intevation.de>
parents:
diff
changeset
|
18 "context" |
024b16a1c253
Implemented deletion of stretches.
Sascha Wilde <wilde@intevation.de>
parents:
diff
changeset
|
19 "database/sql" |
4408
911b1349a9bd
Added minimal error handling to deletion of SR.
Sascha Wilde <wilde@intevation.de>
parents:
4403
diff
changeset
|
20 "errors" |
4400
3b36c4d810b0
Added back end for deletion of sounding results.
Sascha Wilde <wilde@intevation.de>
parents:
4392
diff
changeset
|
21 |
4798
ca6a5f722471
Added Description method to most imports.
Sascha Wilde <wilde@intevation.de>
parents:
4408
diff
changeset
|
22 "gemma.intevation.de/gemma/pkg/common" |
4400
3b36c4d810b0
Added back end for deletion of sounding results.
Sascha Wilde <wilde@intevation.de>
parents:
4392
diff
changeset
|
23 "gemma.intevation.de/gemma/pkg/models" |
4392
024b16a1c253
Implemented deletion of stretches.
Sascha Wilde <wilde@intevation.de>
parents:
diff
changeset
|
24 ) |
024b16a1c253
Implemented deletion of stretches.
Sascha Wilde <wilde@intevation.de>
parents:
diff
changeset
|
25 |
4400
3b36c4d810b0
Added back end for deletion of sounding results.
Sascha Wilde <wilde@intevation.de>
parents:
4392
diff
changeset
|
26 // DeleteSoundingResult is a Job to delete a sounding result from the database. |
3b36c4d810b0
Added back end for deletion of sounding results.
Sascha Wilde <wilde@intevation.de>
parents:
4392
diff
changeset
|
27 type DeleteSoundingResult struct { |
4852
046a07a33b19
Fixed the golint issues of the imports package.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
4847
diff
changeset
|
28 BottleneckID string `json:"bottleneck-id"` |
4400
3b36c4d810b0
Added back end for deletion of sounding results.
Sascha Wilde <wilde@intevation.de>
parents:
4392
diff
changeset
|
29 Date models.Date `json:"date-info"` |
4392
024b16a1c253
Implemented deletion of stretches.
Sascha Wilde <wilde@intevation.de>
parents:
diff
changeset
|
30 } |
024b16a1c253
Implemented deletion of stretches.
Sascha Wilde <wilde@intevation.de>
parents:
diff
changeset
|
31 |
4852
046a07a33b19
Fixed the golint issues of the imports package.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
4847
diff
changeset
|
32 // Description gives a short info about relevant facts of this import. |
4798
ca6a5f722471
Added Description method to most imports.
Sascha Wilde <wilde@intevation.de>
parents:
4408
diff
changeset
|
33 func (dsr *DeleteSoundingResult) Description() (string, error) { |
4852
046a07a33b19
Fixed the golint issues of the imports package.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
4847
diff
changeset
|
34 return dsr.BottleneckID + "|" + dsr.Date.Format(common.DateFormat), nil |
4798
ca6a5f722471
Added Description method to most imports.
Sascha Wilde <wilde@intevation.de>
parents:
4408
diff
changeset
|
35 } |
ca6a5f722471
Added Description method to most imports.
Sascha Wilde <wilde@intevation.de>
parents:
4408
diff
changeset
|
36 |
4400
3b36c4d810b0
Added back end for deletion of sounding results.
Sascha Wilde <wilde@intevation.de>
parents:
4392
diff
changeset
|
37 // DSRJobKind is the import queue type identifier. |
3b36c4d810b0
Added back end for deletion of sounding results.
Sascha Wilde <wilde@intevation.de>
parents:
4392
diff
changeset
|
38 const DSRJobKind JobKind = "dsr" |
4392
024b16a1c253
Implemented deletion of stretches.
Sascha Wilde <wilde@intevation.de>
parents:
diff
changeset
|
39 |
4400
3b36c4d810b0
Added back end for deletion of sounding results.
Sascha Wilde <wilde@intevation.de>
parents:
4392
diff
changeset
|
40 type dsrJobCreator struct{} |
4392
024b16a1c253
Implemented deletion of stretches.
Sascha Wilde <wilde@intevation.de>
parents:
diff
changeset
|
41 |
4400
3b36c4d810b0
Added back end for deletion of sounding results.
Sascha Wilde <wilde@intevation.de>
parents:
4392
diff
changeset
|
42 func init() { RegisterJobCreator(DSRJobKind, dsrJobCreator{}) } |
4392
024b16a1c253
Implemented deletion of stretches.
Sascha Wilde <wilde@intevation.de>
parents:
diff
changeset
|
43 |
4400
3b36c4d810b0
Added back end for deletion of sounding results.
Sascha Wilde <wilde@intevation.de>
parents:
4392
diff
changeset
|
44 func (dsrJobCreator) Description() string { return "delete sounding result" } |
4392
024b16a1c253
Implemented deletion of stretches.
Sascha Wilde <wilde@intevation.de>
parents:
diff
changeset
|
45 |
4400
3b36c4d810b0
Added back end for deletion of sounding results.
Sascha Wilde <wilde@intevation.de>
parents:
4392
diff
changeset
|
46 func (dsrJobCreator) AutoAccept() bool { return false } |
4392
024b16a1c253
Implemented deletion of stretches.
Sascha Wilde <wilde@intevation.de>
parents:
diff
changeset
|
47 |
4400
3b36c4d810b0
Added back end for deletion of sounding results.
Sascha Wilde <wilde@intevation.de>
parents:
4392
diff
changeset
|
48 func (dsrJobCreator) Create() Job { return new(DeleteSoundingResult) } |
4392
024b16a1c253
Implemented deletion of stretches.
Sascha Wilde <wilde@intevation.de>
parents:
diff
changeset
|
49 |
4400
3b36c4d810b0
Added back end for deletion of sounding results.
Sascha Wilde <wilde@intevation.de>
parents:
4392
diff
changeset
|
50 func (dsrJobCreator) Depends() [2][]string { |
4403
9c6c65a628a3
Delete sounding result imports: Fixed dependencies.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
4400
diff
changeset
|
51 // Same as import. |
9c6c65a628a3
Delete sounding result imports: Fixed dependencies.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
4400
diff
changeset
|
52 return srJobCreator{}.Depends() |
4392
024b16a1c253
Implemented deletion of stretches.
Sascha Wilde <wilde@intevation.de>
parents:
diff
changeset
|
53 } |
024b16a1c253
Implemented deletion of stretches.
Sascha Wilde <wilde@intevation.de>
parents:
diff
changeset
|
54 |
024b16a1c253
Implemented deletion of stretches.
Sascha Wilde <wilde@intevation.de>
parents:
diff
changeset
|
55 const ( |
4400
3b36c4d810b0
Added back end for deletion of sounding results.
Sascha Wilde <wilde@intevation.de>
parents:
4392
diff
changeset
|
56 dsrFindSQL = ` |
3b36c4d810b0
Added back end for deletion of sounding results.
Sascha Wilde <wilde@intevation.de>
parents:
4392
diff
changeset
|
57 SELECT id FROM waterway.sounding_results |
3b36c4d810b0
Added back end for deletion of sounding results.
Sascha Wilde <wilde@intevation.de>
parents:
4392
diff
changeset
|
58 WHERE bottleneck_id = $1 |
3b36c4d810b0
Added back end for deletion of sounding results.
Sascha Wilde <wilde@intevation.de>
parents:
4392
diff
changeset
|
59 AND date_info = $2 |
3b36c4d810b0
Added back end for deletion of sounding results.
Sascha Wilde <wilde@intevation.de>
parents:
4392
diff
changeset
|
60 AND staging_done |
4392
024b16a1c253
Implemented deletion of stretches.
Sascha Wilde <wilde@intevation.de>
parents:
diff
changeset
|
61 ` |
4400
3b36c4d810b0
Added back end for deletion of sounding results.
Sascha Wilde <wilde@intevation.de>
parents:
4392
diff
changeset
|
62 dsrStageDoneSQL = ` |
3b36c4d810b0
Added back end for deletion of sounding results.
Sascha Wilde <wilde@intevation.de>
parents:
4392
diff
changeset
|
63 DELETE FROM waterway.sounding_results |
4392
024b16a1c253
Implemented deletion of stretches.
Sascha Wilde <wilde@intevation.de>
parents:
diff
changeset
|
64 WHERE id IN ( |
024b16a1c253
Implemented deletion of stretches.
Sascha Wilde <wilde@intevation.de>
parents:
diff
changeset
|
65 SELECT key from import.track_imports |
024b16a1c253
Implemented deletion of stretches.
Sascha Wilde <wilde@intevation.de>
parents:
diff
changeset
|
66 WHERE import_id = $1 AND |
024b16a1c253
Implemented deletion of stretches.
Sascha Wilde <wilde@intevation.de>
parents:
diff
changeset
|
67 deletion AND |
4400
3b36c4d810b0
Added back end for deletion of sounding results.
Sascha Wilde <wilde@intevation.de>
parents:
4392
diff
changeset
|
68 relation = 'waterway.sounding_results'::regclass)` |
4392
024b16a1c253
Implemented deletion of stretches.
Sascha Wilde <wilde@intevation.de>
parents:
diff
changeset
|
69 ) |
024b16a1c253
Implemented deletion of stretches.
Sascha Wilde <wilde@intevation.de>
parents:
diff
changeset
|
70 |
4400
3b36c4d810b0
Added back end for deletion of sounding results.
Sascha Wilde <wilde@intevation.de>
parents:
4392
diff
changeset
|
71 // StageDone finally removes the sounding result from the database. |
3b36c4d810b0
Added back end for deletion of sounding results.
Sascha Wilde <wilde@intevation.de>
parents:
4392
diff
changeset
|
72 func (dsrJobCreator) StageDone( |
4392
024b16a1c253
Implemented deletion of stretches.
Sascha Wilde <wilde@intevation.de>
parents:
diff
changeset
|
73 ctx context.Context, |
024b16a1c253
Implemented deletion of stretches.
Sascha Wilde <wilde@intevation.de>
parents:
diff
changeset
|
74 tx *sql.Tx, |
024b16a1c253
Implemented deletion of stretches.
Sascha Wilde <wilde@intevation.de>
parents:
diff
changeset
|
75 id int64, |
5034
59a99655f34d
Added feedback support for StageDone.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
4950
diff
changeset
|
76 _ Feedback, |
4392
024b16a1c253
Implemented deletion of stretches.
Sascha Wilde <wilde@intevation.de>
parents:
diff
changeset
|
77 ) error { |
4408
911b1349a9bd
Added minimal error handling to deletion of SR.
Sascha Wilde <wilde@intevation.de>
parents:
4403
diff
changeset
|
78 result, err := tx.ExecContext(ctx, dsrStageDoneSQL, id) |
911b1349a9bd
Added minimal error handling to deletion of SR.
Sascha Wilde <wilde@intevation.de>
parents:
4403
diff
changeset
|
79 if err != nil { |
911b1349a9bd
Added minimal error handling to deletion of SR.
Sascha Wilde <wilde@intevation.de>
parents:
4403
diff
changeset
|
80 return err |
911b1349a9bd
Added minimal error handling to deletion of SR.
Sascha Wilde <wilde@intevation.de>
parents:
4403
diff
changeset
|
81 } |
911b1349a9bd
Added minimal error handling to deletion of SR.
Sascha Wilde <wilde@intevation.de>
parents:
4403
diff
changeset
|
82 rows, err := result.RowsAffected() |
911b1349a9bd
Added minimal error handling to deletion of SR.
Sascha Wilde <wilde@intevation.de>
parents:
4403
diff
changeset
|
83 if err != nil { |
911b1349a9bd
Added minimal error handling to deletion of SR.
Sascha Wilde <wilde@intevation.de>
parents:
4403
diff
changeset
|
84 return err |
911b1349a9bd
Added minimal error handling to deletion of SR.
Sascha Wilde <wilde@intevation.de>
parents:
4403
diff
changeset
|
85 } |
911b1349a9bd
Added minimal error handling to deletion of SR.
Sascha Wilde <wilde@intevation.de>
parents:
4403
diff
changeset
|
86 if rows == 0 { |
4847
4847ac70103a
Made staticcheck happy.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
4799
diff
changeset
|
87 return errors.New("deletion failed. " + |
4408
911b1349a9bd
Added minimal error handling to deletion of SR.
Sascha Wilde <wilde@intevation.de>
parents:
4403
diff
changeset
|
88 "Propably Data outside the area of responsibility." + |
4847
4847ac70103a
Made staticcheck happy.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
4799
diff
changeset
|
89 "Or the data was already deleted by another user") |
4408
911b1349a9bd
Added minimal error handling to deletion of SR.
Sascha Wilde <wilde@intevation.de>
parents:
4403
diff
changeset
|
90 } |
4392
024b16a1c253
Implemented deletion of stretches.
Sascha Wilde <wilde@intevation.de>
parents:
diff
changeset
|
91 return err |
024b16a1c253
Implemented deletion of stretches.
Sascha Wilde <wilde@intevation.de>
parents:
diff
changeset
|
92 } |
024b16a1c253
Implemented deletion of stretches.
Sascha Wilde <wilde@intevation.de>
parents:
diff
changeset
|
93 |
4400
3b36c4d810b0
Added back end for deletion of sounding results.
Sascha Wilde <wilde@intevation.de>
parents:
4392
diff
changeset
|
94 // CleanUp of a sounding result delete import is a NOP. |
3b36c4d810b0
Added back end for deletion of sounding results.
Sascha Wilde <wilde@intevation.de>
parents:
4392
diff
changeset
|
95 func (*DeleteSoundingResult) CleanUp() error { return nil } |
4392
024b16a1c253
Implemented deletion of stretches.
Sascha Wilde <wilde@intevation.de>
parents:
diff
changeset
|
96 |
4400
3b36c4d810b0
Added back end for deletion of sounding results.
Sascha Wilde <wilde@intevation.de>
parents:
4392
diff
changeset
|
97 // Do prepares the deletion of the sounding result. |
3b36c4d810b0
Added back end for deletion of sounding results.
Sascha Wilde <wilde@intevation.de>
parents:
4392
diff
changeset
|
98 func (dsr *DeleteSoundingResult) Do( |
4392
024b16a1c253
Implemented deletion of stretches.
Sascha Wilde <wilde@intevation.de>
parents:
diff
changeset
|
99 ctx context.Context, |
024b16a1c253
Implemented deletion of stretches.
Sascha Wilde <wilde@intevation.de>
parents:
diff
changeset
|
100 importID int64, |
024b16a1c253
Implemented deletion of stretches.
Sascha Wilde <wilde@intevation.de>
parents:
diff
changeset
|
101 conn *sql.Conn, |
024b16a1c253
Implemented deletion of stretches.
Sascha Wilde <wilde@intevation.de>
parents:
diff
changeset
|
102 feedback Feedback, |
024b16a1c253
Implemented deletion of stretches.
Sascha Wilde <wilde@intevation.de>
parents:
diff
changeset
|
103 ) (interface{}, error) { |
024b16a1c253
Implemented deletion of stretches.
Sascha Wilde <wilde@intevation.de>
parents:
diff
changeset
|
104 |
024b16a1c253
Implemented deletion of stretches.
Sascha Wilde <wilde@intevation.de>
parents:
diff
changeset
|
105 tx, err := conn.BeginTx(ctx, nil) |
024b16a1c253
Implemented deletion of stretches.
Sascha Wilde <wilde@intevation.de>
parents:
diff
changeset
|
106 if err != nil { |
024b16a1c253
Implemented deletion of stretches.
Sascha Wilde <wilde@intevation.de>
parents:
diff
changeset
|
107 return nil, err |
024b16a1c253
Implemented deletion of stretches.
Sascha Wilde <wilde@intevation.de>
parents:
diff
changeset
|
108 } |
024b16a1c253
Implemented deletion of stretches.
Sascha Wilde <wilde@intevation.de>
parents:
diff
changeset
|
109 defer tx.Rollback() |
024b16a1c253
Implemented deletion of stretches.
Sascha Wilde <wilde@intevation.de>
parents:
diff
changeset
|
110 |
4400
3b36c4d810b0
Added back end for deletion of sounding results.
Sascha Wilde <wilde@intevation.de>
parents:
4392
diff
changeset
|
111 feedback.Info("SR: bottleneck-id: %v, date-info: %v", |
4852
046a07a33b19
Fixed the golint issues of the imports package.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
4847
diff
changeset
|
112 dsr.BottleneckID, dsr.Date.Time) |
4400
3b36c4d810b0
Added back end for deletion of sounding results.
Sascha Wilde <wilde@intevation.de>
parents:
4392
diff
changeset
|
113 |
3b36c4d810b0
Added back end for deletion of sounding results.
Sascha Wilde <wilde@intevation.de>
parents:
4392
diff
changeset
|
114 var id int64 |
5128
7bd9c5161836
Handle deletion of non-existent sounding results gracefully
Tom Gottfried <tom@intevation.de>
parents:
5034
diff
changeset
|
115 switch err := tx.QueryRowContext(ctx, dsrFindSQL, |
7bd9c5161836
Handle deletion of non-existent sounding results gracefully
Tom Gottfried <tom@intevation.de>
parents:
5034
diff
changeset
|
116 dsr.BottleneckID, dsr.Date.Time).Scan(&id); err { |
7bd9c5161836
Handle deletion of non-existent sounding results gracefully
Tom Gottfried <tom@intevation.de>
parents:
5034
diff
changeset
|
117 case sql.ErrNoRows: |
7bd9c5161836
Handle deletion of non-existent sounding results gracefully
Tom Gottfried <tom@intevation.de>
parents:
5034
diff
changeset
|
118 return nil, UnchangedError("Sounding result does not exist") |
7bd9c5161836
Handle deletion of non-existent sounding results gracefully
Tom Gottfried <tom@intevation.de>
parents:
5034
diff
changeset
|
119 case nil: |
7bd9c5161836
Handle deletion of non-existent sounding results gracefully
Tom Gottfried <tom@intevation.de>
parents:
5034
diff
changeset
|
120 // Continue |
7bd9c5161836
Handle deletion of non-existent sounding results gracefully
Tom Gottfried <tom@intevation.de>
parents:
5034
diff
changeset
|
121 default: |
4392
024b16a1c253
Implemented deletion of stretches.
Sascha Wilde <wilde@intevation.de>
parents:
diff
changeset
|
122 return nil, err |
024b16a1c253
Implemented deletion of stretches.
Sascha Wilde <wilde@intevation.de>
parents:
diff
changeset
|
123 } |
024b16a1c253
Implemented deletion of stretches.
Sascha Wilde <wilde@intevation.de>
parents:
diff
changeset
|
124 |
4400
3b36c4d810b0
Added back end for deletion of sounding results.
Sascha Wilde <wilde@intevation.de>
parents:
4392
diff
changeset
|
125 feedback.Info("Prepare deletion of sounding result with id %d", id) |
4392
024b16a1c253
Implemented deletion of stretches.
Sascha Wilde <wilde@intevation.de>
parents:
diff
changeset
|
126 |
024b16a1c253
Implemented deletion of stretches.
Sascha Wilde <wilde@intevation.de>
parents:
diff
changeset
|
127 if _, err := tx.ExecContext( |
024b16a1c253
Implemented deletion of stretches.
Sascha Wilde <wilde@intevation.de>
parents:
diff
changeset
|
128 ctx, |
024b16a1c253
Implemented deletion of stretches.
Sascha Wilde <wilde@intevation.de>
parents:
diff
changeset
|
129 trackImportDeletionSQL, |
024b16a1c253
Implemented deletion of stretches.
Sascha Wilde <wilde@intevation.de>
parents:
diff
changeset
|
130 importID, |
4400
3b36c4d810b0
Added back end for deletion of sounding results.
Sascha Wilde <wilde@intevation.de>
parents:
4392
diff
changeset
|
131 "waterway.sounding_results", |
3b36c4d810b0
Added back end for deletion of sounding results.
Sascha Wilde <wilde@intevation.de>
parents:
4392
diff
changeset
|
132 id, |
4392
024b16a1c253
Implemented deletion of stretches.
Sascha Wilde <wilde@intevation.de>
parents:
diff
changeset
|
133 true, |
024b16a1c253
Implemented deletion of stretches.
Sascha Wilde <wilde@intevation.de>
parents:
diff
changeset
|
134 ); err != nil { |
024b16a1c253
Implemented deletion of stretches.
Sascha Wilde <wilde@intevation.de>
parents:
diff
changeset
|
135 return nil, err |
024b16a1c253
Implemented deletion of stretches.
Sascha Wilde <wilde@intevation.de>
parents:
diff
changeset
|
136 } |
024b16a1c253
Implemented deletion of stretches.
Sascha Wilde <wilde@intevation.de>
parents:
diff
changeset
|
137 |
024b16a1c253
Implemented deletion of stretches.
Sascha Wilde <wilde@intevation.de>
parents:
diff
changeset
|
138 if err := tx.Commit(); err != nil { |
024b16a1c253
Implemented deletion of stretches.
Sascha Wilde <wilde@intevation.de>
parents:
diff
changeset
|
139 return nil, err |
024b16a1c253
Implemented deletion of stretches.
Sascha Wilde <wilde@intevation.de>
parents:
diff
changeset
|
140 } |
024b16a1c253
Implemented deletion of stretches.
Sascha Wilde <wilde@intevation.de>
parents:
diff
changeset
|
141 |
4400
3b36c4d810b0
Added back end for deletion of sounding results.
Sascha Wilde <wilde@intevation.de>
parents:
4392
diff
changeset
|
142 return dsr, nil |
4392
024b16a1c253
Implemented deletion of stretches.
Sascha Wilde <wilde@intevation.de>
parents:
diff
changeset
|
143 } |