2
0

Replace connection pool

This commit is contained in:
Jack Christensen
2019-04-10 11:09:42 -05:00
parent ec10fdde8b
commit 77a2da2b46
9 changed files with 42 additions and 1602 deletions
+3 -12
View File
@@ -105,10 +105,9 @@ func (c *Conn) BeginEx(ctx context.Context, txOptions *TxOptions) (*Tx, error) {
// All Tx methods return ErrTxClosed if Commit or Rollback has already been
// called on the Tx.
type Tx struct {
conn *Conn
connPool *ConnPool
err error
status int8
conn *Conn
err error
status int8
}
// Commit commits the transaction
@@ -135,10 +134,6 @@ func (tx *Tx) CommitEx(ctx context.Context) error {
tx.conn.die(errors.New("commit failed"))
}
if tx.connPool != nil {
tx.connPool.Release(tx.conn)
}
return tx.err
}
@@ -167,10 +162,6 @@ func (tx *Tx) RollbackEx(ctx context.Context) error {
tx.conn.die(errors.New("rollback failed"))
}
if tx.connPool != nil {
tx.connPool.Release(tx.conn)
}
return tx.err
}