Add pgx.Tx interface and pseudo nested transaction support
This complicates the idea of a persistent transaction status and error so that concept was removed.
This commit is contained in:
+2
-7
@@ -13,12 +13,7 @@ import (
|
||||
//
|
||||
// For more details see: http://www.postgresql.org/docs/current/static/largeobjects.html
|
||||
type LargeObjects struct {
|
||||
tx *Tx
|
||||
}
|
||||
|
||||
// LargeObjects returns a LargeObjects instance for the transaction.
|
||||
func (tx *Tx) LargeObjects() LargeObjects {
|
||||
return LargeObjects{tx: tx}
|
||||
tx Tx
|
||||
}
|
||||
|
||||
type LargeObjectMode int32
|
||||
@@ -84,7 +79,7 @@ func (o *LargeObjects) Unlink(ctx context.Context, oid pgtype.OID) error {
|
||||
// io.Closer
|
||||
type LargeObject struct {
|
||||
ctx context.Context
|
||||
tx *Tx
|
||||
tx Tx
|
||||
fd int32
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user