Mercurial > gemma
comparison pkg/imports/track.go @ 1170:3807b6c2cfbf
merge
author | Markus Kottlaender <markus@intevation.de> |
---|---|
date | Wed, 14 Nov 2018 12:31:15 +0100 |
parents | 930fdd8b474f |
children | d753ce6cf588 |
comparison
equal
deleted
inserted
replaced
1169:a9e455c017cb | 1170:3807b6c2cfbf |
---|---|
1 // This is Free Software under GNU Affero General Public License v >= 3.0 | |
2 // without warranty, see README.md and license for details. | |
3 // | |
4 // SPDX-License-Identifier: AGPL-3.0-or-later | |
5 // License-Filename: LICENSES/AGPL-3.0.txt | |
6 // | |
7 // Copyright (C) 2018 by via donau | |
8 // – Österreichische Wasserstraßen-Gesellschaft mbH | |
9 // Software engineering by Intevation GmbH | |
10 // | |
11 // Author(s): | |
12 // * Sascha L. Teichmann <sascha.teichmann@intevation.de> | |
13 | |
14 package imports | |
15 | |
16 import ( | |
17 "context" | |
18 "database/sql" | |
19 ) | |
20 | |
21 const ( | |
22 trackImportSQL = ` | |
23 INSERT INTO waterway.track_imports (import_id, relation, key) | |
24 VALUES ($1, $2::regclass, $3)` | |
25 ) | |
26 | |
27 func track(tx *sql.Tx, ctx context.Context, importID int64, relation string, key int64) error { | |
28 _, err := tx.ExecContext(ctx, trackImportSQL, importID, relation, key) | |
29 return err | |
30 } |