ref: remove anchored code

pull/1160/head
Saimon Shaplygin 2022-02-12 00:28:46 +03:00 committed by Jack Christensen
parent 71da600c3a
commit 4ac1499060
2 changed files with 2 additions and 26 deletions

24
conn.go
View File

@ -366,30 +366,6 @@ func (c *Conn) Ping(ctx context.Context) error {
return err
}
func connInfoFromRows(rows Rows, err error) (map[string]uint32, error) {
if err != nil {
return nil, err
}
defer rows.Close()
nameOIDs := make(map[string]uint32, 256)
for rows.Next() {
var oid uint32
var name pgtype.Text
if err = rows.Scan(&oid, &name); err != nil {
return nil, err
}
nameOIDs[name.String] = oid
}
if err = rows.Err(); err != nil {
return nil, err
}
return nameOIDs, err
}
// PgConn returns the underlying *pgconn.PgConn. This is an escape hatch method that allows lower level access to the
// PostgreSQL connection than pgx exposes.
//

View File

@ -108,13 +108,13 @@ func (o *LargeObject) Tell() (n int64, err error) {
return n, err
}
// Trunctes the large object to size.
// Truncate the large object to size.
func (o *LargeObject) Truncate(size int64) (err error) {
_, err = o.tx.Exec(o.ctx, "select lo_truncate64($1, $2)", o.fd, size)
return err
}
// Close closees the large object descriptor.
// Close the large object descriptor.
func (o *LargeObject) Close() error {
_, err := o.tx.Exec(o.ctx, "select lo_close($1)", o.fd)
return err