mirror of
https://github.com/superseriousbusiness/gotosocial
synced 2025-06-05 21:59:39 +02:00
[chore]: Bump github.com/jackc/pgx/v4 from 4.17.2 to 4.18.1 (#1595)
Bumps [github.com/jackc/pgx/v4](https://github.com/jackc/pgx) from 4.17.2 to 4.18.1. - [Release notes](https://github.com/jackc/pgx/releases) - [Changelog](https://github.com/jackc/pgx/blob/v4.18.1/CHANGELOG.md) - [Commits](https://github.com/jackc/pgx/compare/v4.17.2...v4.18.1) --- updated-dependencies: - dependency-name: github.com/jackc/pgx/v4 dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
This commit is contained in:
19
vendor/github.com/jackc/pgx/v4/stdlib/sql.go
generated
vendored
19
vendor/github.com/jackc/pgx/v4/stdlib/sql.go
generated
vendored
@ -84,7 +84,13 @@ func init() {
|
||||
configs: make(map[string]*pgx.ConnConfig),
|
||||
}
|
||||
fakeTxConns = make(map[*pgx.Conn]*sql.Tx)
|
||||
sql.Register("pgx", pgxDriver)
|
||||
|
||||
// if pgx driver was already registered by different pgx major version then we
|
||||
// skip registration under the default name.
|
||||
if !contains(sql.Drivers(), "pgx") {
|
||||
sql.Register("pgx", pgxDriver)
|
||||
}
|
||||
sql.Register("pgx/v4", pgxDriver)
|
||||
|
||||
databaseSQLResultFormats = pgx.QueryResultFormatsByOID{
|
||||
pgtype.BoolOID: 1,
|
||||
@ -103,6 +109,17 @@ func init() {
|
||||
}
|
||||
}
|
||||
|
||||
// TODO replace by slices.Contains when experimental package will be merged to stdlib
|
||||
// https://pkg.go.dev/golang.org/x/exp/slices#Contains
|
||||
func contains(list []string, y string) bool {
|
||||
for _, x := range list {
|
||||
if x == y {
|
||||
return true
|
||||
}
|
||||
}
|
||||
return false
|
||||
}
|
||||
|
||||
var (
|
||||
fakeTxMutex sync.Mutex
|
||||
fakeTxConns map[*pgx.Conn]*sql.Tx
|
||||
|
Reference in New Issue
Block a user