summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLibravatar kim <89579420+NyaaaWhatsUpDoc@users.noreply.github.com>2024-02-13 09:51:10 +0000
committerLibravatar GitHub <noreply@github.com>2024-02-13 09:51:10 +0000
commit3481a09b47eac3249677de25152713fd8823da83 (patch)
treec4f4d8af106b224d531b7fb05018cd5e0682e540
parent[performance] temporarily cache account status counts to reduce no. account c... (diff)
downloadgotosocial-3481a09b47eac3249677de25152713fd8823da83.tar.xz
remove the execer and queryer conformance requirements (#2636)
-rw-r--r--internal/db/bundb/drivers.go9
1 files changed, 7 insertions, 2 deletions
diff --git a/internal/db/bundb/drivers.go b/internal/db/bundb/drivers.go
index a70b598d2..3050a13a0 100644
--- a/internal/db/bundb/drivers.go
+++ b/internal/db/bundb/drivers.go
@@ -34,6 +34,13 @@ var (
// global SQL driver instances.
postgresDriver = pgx.GetDefaultDriver()
sqliteDriver = getSQLiteDriver()
+
+ // check the postgres connection
+ // conforms to our conn{} interface.
+ // (note SQLite doesn't export their
+ // conn type, and gets checked in
+ // tests very regularly anywho).
+ _ conn = (*pgx.Conn)(nil)
)
//go:linkname getSQLiteDriver modernc.org/sqlite.newDriver
@@ -278,9 +285,7 @@ func (stmt *SQLiteStmt) QueryContext(ctx context.Context, args []driver.NamedVal
type conn interface {
driver.Conn
driver.ConnPrepareContext
- driver.Execer //nolint:staticcheck
driver.ExecerContext
- driver.Queryer //nolint:staticcheck
driver.QueryerContext
driver.ConnBeginTx
}