mirror of
https://github.com/jackc/pgx.git
synced 2025-05-31 11:42:24 +00:00
Remove unused method
This commit is contained in:
parent
a64551fec8
commit
5cb17c5859
23
batch.go
23
batch.go
@ -4,7 +4,6 @@ import (
|
|||||||
"context"
|
"context"
|
||||||
|
|
||||||
"github.com/jackc/pgx/pgconn"
|
"github.com/jackc/pgx/pgconn"
|
||||||
"github.com/jackc/pgx/pgproto3"
|
|
||||||
"github.com/jackc/pgx/pgtype"
|
"github.com/jackc/pgx/pgtype"
|
||||||
"github.com/pkg/errors"
|
"github.com/pkg/errors"
|
||||||
)
|
)
|
||||||
@ -198,25 +197,3 @@ func (b *Batch) die(err error) {
|
|||||||
b.connPool.Release(b.conn)
|
b.connPool.Release(b.conn)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
func (b *Batch) ensureCommandComplete() error {
|
|
||||||
for b.pendingCommandComplete {
|
|
||||||
msg, err := b.conn.rxMsg()
|
|
||||||
if err != nil {
|
|
||||||
return err
|
|
||||||
}
|
|
||||||
|
|
||||||
switch msg := msg.(type) {
|
|
||||||
case *pgproto3.CommandComplete:
|
|
||||||
b.pendingCommandComplete = false
|
|
||||||
return nil
|
|
||||||
default:
|
|
||||||
err = b.conn.processContextFreeMsg(msg)
|
|
||||||
if err != nil {
|
|
||||||
return err
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user