mirror of https://github.com/jackc/pgx.git
Remove another no longer used method
parent
5cb17c5859
commit
08c8b49fe4
28
query.go
28
query.go
|
@ -11,7 +11,6 @@ import (
|
||||||
|
|
||||||
"github.com/jackc/pgx/internal/sanitize"
|
"github.com/jackc/pgx/internal/sanitize"
|
||||||
"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"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@ -520,33 +519,6 @@ func (c *Conn) buildOneRoundTripQueryEx(buf []byte, sql string, options *QueryEx
|
||||||
return buf, nil
|
return buf, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
func (c *Conn) readUntilRowDescription() ([]FieldDescription, error) {
|
|
||||||
for {
|
|
||||||
msg, err := c.rxMsg()
|
|
||||||
if err != nil {
|
|
||||||
return nil, err
|
|
||||||
}
|
|
||||||
|
|
||||||
switch msg := msg.(type) {
|
|
||||||
case *pgproto3.ParameterDescription:
|
|
||||||
case *pgproto3.RowDescription:
|
|
||||||
fieldDescriptions := c.rxRowDescription(msg)
|
|
||||||
for i := range fieldDescriptions {
|
|
||||||
if dt, ok := c.ConnInfo.DataTypeForOID(fieldDescriptions[i].DataType); ok {
|
|
||||||
fieldDescriptions[i].DataTypeName = dt.Name
|
|
||||||
} else {
|
|
||||||
return nil, errors.Errorf("unknown oid: %d", fieldDescriptions[i].DataType)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return fieldDescriptions, nil
|
|
||||||
default:
|
|
||||||
if err := c.processContextFreeMsg(msg); err != nil {
|
|
||||||
return nil, err
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
func (c *Conn) sanitizeAndSendSimpleQuery(sql string, args ...interface{}) (err error) {
|
func (c *Conn) sanitizeAndSendSimpleQuery(sql string, args ...interface{}) (err error) {
|
||||||
if c.pgConn.ParameterStatus("standard_conforming_strings") != "on" {
|
if c.pgConn.ParameterStatus("standard_conforming_strings") != "on" {
|
||||||
return errors.New("simple protocol queries must be run with standard_conforming_strings=on")
|
return errors.New("simple protocol queries must be run with standard_conforming_strings=on")
|
||||||
|
|
Loading…
Reference in New Issue