comparison pkg/imports/track.go @ 1995:59055c8301df

Move import queue to its own database namespace Authorisation of the import queue has to be handled differently from the waterway-related data in the waterway schema. This is easier to handle, if both are in their own schema/namespace.
author Tom Gottfried <tom@intevation.de>
date Thu, 24 Jan 2019 12:56:31 +0100
parents d753ce6cf588
children e45442db19b1
comparison
equal deleted inserted replaced
1994:a7c4005b723f 1995:59055c8301df
18 "database/sql" 18 "database/sql"
19 ) 19 )
20 20
21 const ( 21 const (
22 trackImportSQL = ` 22 trackImportSQL = `
23 INSERT INTO waterway.track_imports (import_id, relation, key) 23 INSERT INTO import.track_imports (import_id, relation, key)
24 VALUES ($1, $2::regclass, $3)` 24 VALUES ($1, $2::regclass, $3)`
25 ) 25 )
26 26
27 func track(ctx context.Context, tx *sql.Tx, importID int64, relation string, key int64) error { 27 func track(ctx context.Context, tx *sql.Tx, importID int64, relation string, key int64) error {
28 _, err := tx.ExecContext(ctx, trackImportSQL, importID, relation, key) 28 _, err := tx.ExecContext(ctx, trackImportSQL, importID, relation, key)