mirror of
https://github.com/superseriousbusiness/gotosocial.git
synced 2024-11-28 03:11:01 +00:00
remove the execer and queryer conformance requirements (#2636)
This commit is contained in:
parent
ede8f43635
commit
3481a09b47
1 changed files with 7 additions and 2 deletions
|
@ -34,6 +34,13 @@ var (
|
||||||
// global SQL driver instances.
|
// global SQL driver instances.
|
||||||
postgresDriver = pgx.GetDefaultDriver()
|
postgresDriver = pgx.GetDefaultDriver()
|
||||||
sqliteDriver = getSQLiteDriver()
|
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
|
//go:linkname getSQLiteDriver modernc.org/sqlite.newDriver
|
||||||
|
@ -278,9 +285,7 @@ func (stmt *SQLiteStmt) QueryContext(ctx context.Context, args []driver.NamedVal
|
||||||
type conn interface {
|
type conn interface {
|
||||||
driver.Conn
|
driver.Conn
|
||||||
driver.ConnPrepareContext
|
driver.ConnPrepareContext
|
||||||
driver.Execer //nolint:staticcheck
|
|
||||||
driver.ExecerContext
|
driver.ExecerContext
|
||||||
driver.Queryer //nolint:staticcheck
|
|
||||||
driver.QueryerContext
|
driver.QueryerContext
|
||||||
driver.ConnBeginTx
|
driver.ConnBeginTx
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue