2
0

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:
Jack Christensen
2019-08-17 17:22:14 -05:00
parent 64b4414efc
commit 99e5461522
7 changed files with 267 additions and 143 deletions
+2 -7
View File
@@ -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
}