aboutsummaryrefslogtreecommitdiff
path: root/syncapi/storage/sqlite3/ignores_table.go
diff options
context:
space:
mode:
Diffstat (limited to 'syncapi/storage/sqlite3/ignores_table.go')
-rw-r--r--syncapi/storage/sqlite3/ignores_table.go11
1 files changed, 4 insertions, 7 deletions
diff --git a/syncapi/storage/sqlite3/ignores_table.go b/syncapi/storage/sqlite3/ignores_table.go
index 5ee1a9fa..bff5780b 100644
--- a/syncapi/storage/sqlite3/ignores_table.go
+++ b/syncapi/storage/sqlite3/ignores_table.go
@@ -52,13 +52,10 @@ func NewSqliteIgnoresTable(db *sql.DB) (tables.Ignores, error) {
return nil, err
}
s := &ignoresStatements{}
- if s.selectIgnoresStmt, err = db.Prepare(selectIgnoresSQL); err != nil {
- return nil, err
- }
- if s.upsertIgnoresStmt, err = db.Prepare(upsertIgnoresSQL); err != nil {
- return nil, err
- }
- return s, nil
+ return s, sqlutil.StatementList{
+ {&s.selectIgnoresStmt, selectIgnoresSQL},
+ {&s.upsertIgnoresStmt, upsertIgnoresSQL},
+ }.Prepare(db)
}
func (s *ignoresStatements) SelectIgnores(