diff options
author | Paul Duncan <pabs@pablotron.org> | 2022-02-26 10:05:46 -0500 |
---|---|---|
committer | Paul Duncan <pabs@pablotron.org> | 2022-02-26 10:05:46 -0500 |
commit | 681c8377558cec1ed75ee2e59e09582e95040690 (patch) | |
tree | a28ea5127e7f09e211437b97fd8f393b75d14bfd | |
parent | 7413c56a6ac3d7a14ebde6ebb504efc4f3d5d575 (diff) | |
download | cvez-681c8377558cec1ed75ee2e59e09582e95040690.tar.bz2 cvez-681c8377558cec1ed75ee2e59e09582e95040690.zip |
dbstore/dbstore.go: move addCpeDictionaryQueryIds
-rw-r--r-- | dbstore/dbstore.go | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/dbstore/dbstore.go b/dbstore/dbstore.go index 6ff0ced..6f53081 100644 --- a/dbstore/dbstore.go +++ b/dbstore/dbstore.go @@ -79,12 +79,6 @@ func (me DbStore) Init(ctx context.Context) error { } } -var addCpeDictionaryQueryIds = []string { - "cpe/insert", - "cpe/insert-title", - "cpe/insert-ref", -} - // Begin new transaction and create prepared statements. func (me DbStore) Begin(ctx context.Context, queryIds []string) (Tx, error) { return newTx(ctx, me.db, queryIds) @@ -175,6 +169,13 @@ func (me DbStore) QueryRow( return fn(me.db.QueryRowContext(ctx, sql, args...)) } +// queries used by AddCpeDictionary() +var addCpeDictionaryQueryIds = []string { + "cpe/insert", + "cpe/insert-title", + "cpe/insert-ref", +} + // import CPE dictionary func (me DbStore) AddCpeDictionary(ctx context.Context, dict cpedict.Dictionary) error { // lazy-init db |