diff options
author | Till <2353100+S7evinK@users.noreply.github.com> | 2023-03-23 13:52:53 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-03-23 13:52:53 +0100 |
commit | 234ed603e6b8c7f1f766a002a097007189e1184e (patch) | |
tree | 6b7eefa440f2f98e5addee9cbfca6b218a73ef98 /syncapi/storage/sqlite3/stream_id_table.go | |
parent | cb18ba023084a364a332d09e32ae22d375ed4520 (diff) |
Move every `db.Prepare` to `sqlutil.Statementlist`, remove trace driver (#3026)
Doesn't buy us much, but makes everything a bit more consistent.
Also removes the SQL trace driver, as it is unused and the output is
hard to read anyway.
Diffstat (limited to 'syncapi/storage/sqlite3/stream_id_table.go')
-rw-r--r-- | syncapi/storage/sqlite3/stream_id_table.go | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/syncapi/storage/sqlite3/stream_id_table.go b/syncapi/storage/sqlite3/stream_id_table.go index a4bba508..b51eccf5 100644 --- a/syncapi/storage/sqlite3/stream_id_table.go +++ b/syncapi/storage/sqlite3/stream_id_table.go @@ -47,10 +47,9 @@ func (s *StreamIDStatements) Prepare(db *sql.DB) (err error) { if err != nil { return } - if s.increaseStreamIDStmt, err = db.Prepare(increaseStreamIDStmt); err != nil { - return - } - return + return sqlutil.StatementList{ + {&s.increaseStreamIDStmt, increaseStreamIDStmt}, + }.Prepare(db) } func (s *StreamIDStatements) nextPDUID(ctx context.Context, txn *sql.Tx) (pos types.StreamPosition, err error) { |