2
0

Rename pgtype.DataType to pgtype.Type

This commit is contained in:
Jack Christensen
2022-02-21 09:01:48 -06:00
parent a3c351d11a
commit bda10b2ec9
17 changed files with 190 additions and 191 deletions
+2 -2
View File
@@ -79,7 +79,7 @@ func convertSimpleArgument(ci *pgtype.ConnInfo, arg interface{}) (interface{}, e
return int64(arg), nil
}
if _, found := ci.DataTypeForValue(arg); found {
if _, found := ci.TypeForValue(arg); found {
buf, err := ci.Encode(0, TextFormatCode, arg, nil)
if err != nil {
return nil, err
@@ -123,7 +123,7 @@ func encodePreparedStatementArgument(ci *pgtype.ConnInfo, buf []byte, oid uint32
return encodePreparedStatementArgument(ci, buf, oid, arg)
}
if _, ok := ci.DataTypeForOID(oid); ok {
if _, ok := ci.TypeForOID(oid); ok {
sp := len(buf)
buf = pgio.AppendInt32(buf, -1)
argBuf, err := ci.Encode(oid, BinaryFormatCode, arg, buf)