From 681c8377558cec1ed75ee2e59e09582e95040690 Mon Sep 17 00:00:00 2001 From: Paul Duncan Date: Sat, 26 Feb 2022 10:05:46 -0500 Subject: dbstore/dbstore.go: move addCpeDictionaryQueryIds --- dbstore/dbstore.go | 13 +++++++------ 1 file 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 -- cgit v1.2.3