mirror of
https://github.com/superseriousbusiness/gotosocial.git
synced 2025-11-09 02:57:30 -06:00
Update dependencies (#333)
This commit is contained in:
parent
ce22e03f9d
commit
182b4eea73
848 changed files with 377869 additions and 107280 deletions
8
vendor/github.com/jackc/pgx/v4/tx.go
generated
vendored
8
vendor/github.com/jackc/pgx/v4/tx.go
generated
vendored
|
|
@ -10,6 +10,7 @@ import (
|
|||
"github.com/jackc/pgconn"
|
||||
)
|
||||
|
||||
// TxIsoLevel is the transaction isolation level (serializable, repeatable read, read committed or read uncommitted)
|
||||
type TxIsoLevel string
|
||||
|
||||
// Transaction isolation levels
|
||||
|
|
@ -20,6 +21,7 @@ const (
|
|||
ReadUncommitted = TxIsoLevel("read uncommitted")
|
||||
)
|
||||
|
||||
// TxAccessMode is the transaction access mode (read write or read only)
|
||||
type TxAccessMode string
|
||||
|
||||
// Transaction access modes
|
||||
|
|
@ -28,6 +30,7 @@ const (
|
|||
ReadOnly = TxAccessMode("read only")
|
||||
)
|
||||
|
||||
// TxDeferrableMode is the transaction deferrable mode (deferrable or not deferrable)
|
||||
type TxDeferrableMode string
|
||||
|
||||
// Transaction deferrable modes
|
||||
|
|
@ -36,6 +39,7 @@ const (
|
|||
NotDeferrable = TxDeferrableMode("not deferrable")
|
||||
)
|
||||
|
||||
// TxOptions are transaction modes within a transaction block
|
||||
type TxOptions struct {
|
||||
IsoLevel TxIsoLevel
|
||||
AccessMode TxAccessMode
|
||||
|
|
@ -109,7 +113,7 @@ func (c *Conn) BeginTxFunc(ctx context.Context, txOptions TxOptions, f func(Tx)
|
|||
}
|
||||
defer func() {
|
||||
rollbackErr := tx.Rollback(ctx)
|
||||
if !(rollbackErr == nil || errors.Is(rollbackErr, ErrTxClosed)) {
|
||||
if rollbackErr != nil && !errors.Is(rollbackErr, ErrTxClosed) {
|
||||
err = rollbackErr
|
||||
}
|
||||
}()
|
||||
|
|
@ -203,7 +207,7 @@ func (tx *dbTx) BeginFunc(ctx context.Context, f func(Tx) error) (err error) {
|
|||
}
|
||||
defer func() {
|
||||
rollbackErr := savepoint.Rollback(ctx)
|
||||
if !(rollbackErr == nil || errors.Is(rollbackErr, ErrTxClosed)) {
|
||||
if rollbackErr != nil && !errors.Is(rollbackErr, ErrTxClosed) {
|
||||
err = rollbackErr
|
||||
}
|
||||
}()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue