mirror of https://github.com/jackc/pgx.git
Add the type of the value in all decode error messages
parent
8707449219
commit
fa045b7a4b
|
@ -70,7 +70,7 @@ func (src *ACLItem) AssignTo(dst interface{}) error {
|
|||
return NullAssignTo(dst)
|
||||
}
|
||||
|
||||
return errors.Errorf("cannot decode %v into %T", src, dst)
|
||||
return errors.Errorf("cannot decode %#v into %T", src, dst)
|
||||
}
|
||||
|
||||
func (dst *ACLItem) DecodeText(ci *ConnInfo, src []byte) error {
|
||||
|
|
|
@ -84,7 +84,7 @@ func (src *ACLItemArray) AssignTo(dst interface{}) error {
|
|||
return NullAssignTo(dst)
|
||||
}
|
||||
|
||||
return errors.Errorf("cannot decode %v into %T", src, dst)
|
||||
return errors.Errorf("cannot decode %#v into %T", src, dst)
|
||||
}
|
||||
|
||||
func (dst *ACLItemArray) DecodeText(ci *ConnInfo, src []byte) error {
|
||||
|
|
|
@ -64,7 +64,7 @@ func (src *Bool) AssignTo(dst interface{}) error {
|
|||
return NullAssignTo(dst)
|
||||
}
|
||||
|
||||
return errors.Errorf("cannot decode %v into %T", src, dst)
|
||||
return errors.Errorf("cannot decode %#v into %T", src, dst)
|
||||
}
|
||||
|
||||
func (dst *Bool) DecodeText(ci *ConnInfo, src []byte) error {
|
||||
|
|
|
@ -86,7 +86,7 @@ func (src *BoolArray) AssignTo(dst interface{}) error {
|
|||
return NullAssignTo(dst)
|
||||
}
|
||||
|
||||
return errors.Errorf("cannot decode %v into %T", src, dst)
|
||||
return errors.Errorf("cannot decode %#v into %T", src, dst)
|
||||
}
|
||||
|
||||
func (dst *BoolArray) DecodeText(ci *ConnInfo, src []byte) error {
|
||||
|
|
|
@ -86,7 +86,7 @@ func (src *BPCharArray) AssignTo(dst interface{}) error {
|
|||
return NullAssignTo(dst)
|
||||
}
|
||||
|
||||
return errors.Errorf("cannot decode %v into %T", src, dst)
|
||||
return errors.Errorf("cannot decode %#v into %T", src, dst)
|
||||
}
|
||||
|
||||
func (dst *BPCharArray) DecodeText(ci *ConnInfo, src []byte) error {
|
||||
|
|
|
@ -64,7 +64,7 @@ func (src *Bytea) AssignTo(dst interface{}) error {
|
|||
return NullAssignTo(dst)
|
||||
}
|
||||
|
||||
return errors.Errorf("cannot decode %v into %T", src, dst)
|
||||
return errors.Errorf("cannot decode %#v into %T", src, dst)
|
||||
}
|
||||
|
||||
// DecodeText only supports the hex format. This has been the default since
|
||||
|
|
|
@ -86,7 +86,7 @@ func (src *ByteaArray) AssignTo(dst interface{}) error {
|
|||
return NullAssignTo(dst)
|
||||
}
|
||||
|
||||
return errors.Errorf("cannot decode %v into %T", src, dst)
|
||||
return errors.Errorf("cannot decode %#v into %T", src, dst)
|
||||
}
|
||||
|
||||
func (dst *ByteaArray) DecodeText(ci *ConnInfo, src []byte) error {
|
||||
|
|
|
@ -115,7 +115,7 @@ func (src *CIDRArray) AssignTo(dst interface{}) error {
|
|||
return NullAssignTo(dst)
|
||||
}
|
||||
|
||||
return errors.Errorf("cannot decode %v into %T", src, dst)
|
||||
return errors.Errorf("cannot decode %#v into %T", src, dst)
|
||||
}
|
||||
|
||||
func (dst *CIDRArray) DecodeText(ci *ConnInfo, src []byte) error {
|
||||
|
|
|
@ -72,7 +72,7 @@ func (src *Date) AssignTo(dst interface{}) error {
|
|||
return NullAssignTo(dst)
|
||||
}
|
||||
|
||||
return errors.Errorf("cannot decode %v into %T", src, dst)
|
||||
return errors.Errorf("cannot decode %#v into %T", src, dst)
|
||||
}
|
||||
|
||||
func (dst *Date) DecodeText(ci *ConnInfo, src []byte) error {
|
||||
|
|
|
@ -87,7 +87,7 @@ func (src *DateArray) AssignTo(dst interface{}) error {
|
|||
return NullAssignTo(dst)
|
||||
}
|
||||
|
||||
return errors.Errorf("cannot decode %v into %T", src, dst)
|
||||
return errors.Errorf("cannot decode %#v into %T", src, dst)
|
||||
}
|
||||
|
||||
func (dst *DateArray) DecodeText(ci *ConnInfo, src []byte) error {
|
||||
|
|
|
@ -84,7 +84,7 @@ func (src *EnumArray) AssignTo(dst interface{}) error {
|
|||
return NullAssignTo(dst)
|
||||
}
|
||||
|
||||
return errors.Errorf("cannot decode %v into %T", src, dst)
|
||||
return errors.Errorf("cannot decode %#v into %T", src, dst)
|
||||
}
|
||||
|
||||
func (dst *EnumArray) DecodeText(ci *ConnInfo, src []byte) error {
|
||||
|
|
|
@ -86,7 +86,7 @@ func (src *Float4Array) AssignTo(dst interface{}) error {
|
|||
return NullAssignTo(dst)
|
||||
}
|
||||
|
||||
return errors.Errorf("cannot decode %v into %T", src, dst)
|
||||
return errors.Errorf("cannot decode %#v into %T", src, dst)
|
||||
}
|
||||
|
||||
func (dst *Float4Array) DecodeText(ci *ConnInfo, src []byte) error {
|
||||
|
|
|
@ -86,7 +86,7 @@ func (src *Float8Array) AssignTo(dst interface{}) error {
|
|||
return NullAssignTo(dst)
|
||||
}
|
||||
|
||||
return errors.Errorf("cannot decode %v into %T", src, dst)
|
||||
return errors.Errorf("cannot decode %#v into %T", src, dst)
|
||||
}
|
||||
|
||||
func (dst *Float8Array) DecodeText(ci *ConnInfo, src []byte) error {
|
||||
|
|
|
@ -59,7 +59,7 @@ func (src *Hstore) AssignTo(dst interface{}) error {
|
|||
*v = make(map[string]string, len(src.Map))
|
||||
for k, val := range src.Map {
|
||||
if val.Status != Present {
|
||||
return errors.Errorf("cannot decode %v into %T", src, dst)
|
||||
return errors.Errorf("cannot decode %#v into %T", src, dst)
|
||||
}
|
||||
(*v)[k] = val.String
|
||||
}
|
||||
|
@ -73,7 +73,7 @@ func (src *Hstore) AssignTo(dst interface{}) error {
|
|||
return NullAssignTo(dst)
|
||||
}
|
||||
|
||||
return errors.Errorf("cannot decode %v into %T", src, dst)
|
||||
return errors.Errorf("cannot decode %#v into %T", src, dst)
|
||||
}
|
||||
|
||||
func (dst *Hstore) DecodeText(ci *ConnInfo, src []byte) error {
|
||||
|
|
|
@ -86,7 +86,7 @@ func (src *HstoreArray) AssignTo(dst interface{}) error {
|
|||
return NullAssignTo(dst)
|
||||
}
|
||||
|
||||
return errors.Errorf("cannot decode %v into %T", src, dst)
|
||||
return errors.Errorf("cannot decode %#v into %T", src, dst)
|
||||
}
|
||||
|
||||
func (dst *HstoreArray) DecodeText(ci *ConnInfo, src []byte) error {
|
||||
|
|
|
@ -91,7 +91,7 @@ func (src *Inet) AssignTo(dst interface{}) error {
|
|||
return NullAssignTo(dst)
|
||||
}
|
||||
|
||||
return errors.Errorf("cannot decode %v into %T", src, dst)
|
||||
return errors.Errorf("cannot decode %#v into %T", src, dst)
|
||||
}
|
||||
|
||||
func (dst *Inet) DecodeText(ci *ConnInfo, src []byte) error {
|
||||
|
|
|
@ -115,7 +115,7 @@ func (src *InetArray) AssignTo(dst interface{}) error {
|
|||
return NullAssignTo(dst)
|
||||
}
|
||||
|
||||
return errors.Errorf("cannot decode %v into %T", src, dst)
|
||||
return errors.Errorf("cannot decode %#v into %T", src, dst)
|
||||
}
|
||||
|
||||
func (dst *InetArray) DecodeText(ci *ConnInfo, src []byte) error {
|
||||
|
|
|
@ -114,7 +114,7 @@ func (src *Int2Array) AssignTo(dst interface{}) error {
|
|||
return NullAssignTo(dst)
|
||||
}
|
||||
|
||||
return errors.Errorf("cannot decode %v into %T", src, dst)
|
||||
return errors.Errorf("cannot decode %#v into %T", src, dst)
|
||||
}
|
||||
|
||||
func (dst *Int2Array) DecodeText(ci *ConnInfo, src []byte) error {
|
||||
|
|
|
@ -114,7 +114,7 @@ func (src *Int4Array) AssignTo(dst interface{}) error {
|
|||
return NullAssignTo(dst)
|
||||
}
|
||||
|
||||
return errors.Errorf("cannot decode %v into %T", src, dst)
|
||||
return errors.Errorf("cannot decode %#v into %T", src, dst)
|
||||
}
|
||||
|
||||
func (dst *Int4Array) DecodeText(ci *ConnInfo, src []byte) error {
|
||||
|
|
|
@ -114,7 +114,7 @@ func (src *Int8Array) AssignTo(dst interface{}) error {
|
|||
return NullAssignTo(dst)
|
||||
}
|
||||
|
||||
return errors.Errorf("cannot decode %v into %T", src, dst)
|
||||
return errors.Errorf("cannot decode %#v into %T", src, dst)
|
||||
}
|
||||
|
||||
func (dst *Int8Array) DecodeText(ci *ConnInfo, src []byte) error {
|
||||
|
|
|
@ -74,7 +74,7 @@ func (src *Interval) AssignTo(dst interface{}) error {
|
|||
return NullAssignTo(dst)
|
||||
}
|
||||
|
||||
return errors.Errorf("cannot decode %v into %T", src, dst)
|
||||
return errors.Errorf("cannot decode %#v into %T", src, dst)
|
||||
}
|
||||
|
||||
func (dst *Interval) DecodeText(ci *ConnInfo, src []byte) error {
|
||||
|
|
|
@ -70,7 +70,7 @@ func (src *Macaddr) AssignTo(dst interface{}) error {
|
|||
return NullAssignTo(dst)
|
||||
}
|
||||
|
||||
return errors.Errorf("cannot decode %v into %T", src, dst)
|
||||
return errors.Errorf("cannot decode %#v into %T", src, dst)
|
||||
}
|
||||
|
||||
func (dst *Macaddr) DecodeText(ci *ConnInfo, src []byte) error {
|
||||
|
|
|
@ -170,7 +170,7 @@ func (src *NumericArray) AssignTo(dst interface{}) error {
|
|||
return NullAssignTo(dst)
|
||||
}
|
||||
|
||||
return errors.Errorf("cannot decode %v into %T", src, dst)
|
||||
return errors.Errorf("cannot decode %#v into %T", src, dst)
|
||||
}
|
||||
|
||||
func (dst *NumericArray) DecodeText(ci *ConnInfo, src []byte) error {
|
||||
|
|
|
@ -67,7 +67,7 @@ func (src *Record) AssignTo(dst interface{}) error {
|
|||
return NullAssignTo(dst)
|
||||
}
|
||||
|
||||
return errors.Errorf("cannot decode %v into %T", src, dst)
|
||||
return errors.Errorf("cannot decode %#v into %T", src, dst)
|
||||
}
|
||||
|
||||
func (dst *Record) DecodeBinary(ci *ConnInfo, src []byte) error {
|
||||
|
|
|
@ -74,7 +74,7 @@ func (src *Text) AssignTo(dst interface{}) error {
|
|||
return NullAssignTo(dst)
|
||||
}
|
||||
|
||||
return errors.Errorf("cannot decode %v into %T", src, dst)
|
||||
return errors.Errorf("cannot decode %#v into %T", src, dst)
|
||||
}
|
||||
|
||||
func (dst *Text) DecodeText(ci *ConnInfo, src []byte) error {
|
||||
|
|
|
@ -86,7 +86,7 @@ func (src *TextArray) AssignTo(dst interface{}) error {
|
|||
return NullAssignTo(dst)
|
||||
}
|
||||
|
||||
return errors.Errorf("cannot decode %v into %T", src, dst)
|
||||
return errors.Errorf("cannot decode %#v into %T", src, dst)
|
||||
}
|
||||
|
||||
func (dst *TextArray) DecodeText(ci *ConnInfo, src []byte) error {
|
||||
|
|
|
@ -76,7 +76,7 @@ func (src *Timestamp) AssignTo(dst interface{}) error {
|
|||
return NullAssignTo(dst)
|
||||
}
|
||||
|
||||
return errors.Errorf("cannot decode %v into %T", src, dst)
|
||||
return errors.Errorf("cannot decode %#v into %T", src, dst)
|
||||
}
|
||||
|
||||
// DecodeText decodes from src into dst. The decoded time is considered to
|
||||
|
|
|
@ -87,7 +87,7 @@ func (src *TimestampArray) AssignTo(dst interface{}) error {
|
|||
return NullAssignTo(dst)
|
||||
}
|
||||
|
||||
return errors.Errorf("cannot decode %v into %T", src, dst)
|
||||
return errors.Errorf("cannot decode %#v into %T", src, dst)
|
||||
}
|
||||
|
||||
func (dst *TimestampArray) DecodeText(ci *ConnInfo, src []byte) error {
|
||||
|
|
|
@ -77,7 +77,7 @@ func (src *Timestamptz) AssignTo(dst interface{}) error {
|
|||
return NullAssignTo(dst)
|
||||
}
|
||||
|
||||
return errors.Errorf("cannot decode %v into %T", src, dst)
|
||||
return errors.Errorf("cannot decode %#v into %T", src, dst)
|
||||
}
|
||||
|
||||
func (dst *Timestamptz) DecodeText(ci *ConnInfo, src []byte) error {
|
||||
|
|
|
@ -87,7 +87,7 @@ func (src *TimestamptzArray) AssignTo(dst interface{}) error {
|
|||
return NullAssignTo(dst)
|
||||
}
|
||||
|
||||
return errors.Errorf("cannot decode %v into %T", src, dst)
|
||||
return errors.Errorf("cannot decode %#v into %T", src, dst)
|
||||
}
|
||||
|
||||
func (dst *TimestamptzArray) DecodeText(ci *ConnInfo, src []byte) error {
|
||||
|
|
|
@ -86,7 +86,7 @@ func (src *<%= pgtype_array_type %>) AssignTo(dst interface{}) error {
|
|||
return NullAssignTo(dst)
|
||||
}
|
||||
|
||||
return errors.Errorf("cannot decode %v into %T", src, dst)
|
||||
return errors.Errorf("cannot decode %#v into %T", src, dst)
|
||||
}
|
||||
|
||||
func (dst *<%= pgtype_array_type %>) DecodeText(ci *ConnInfo, src []byte) error {
|
||||
|
|
|
@ -142,7 +142,7 @@ func (src *UUIDArray) AssignTo(dst interface{}) error {
|
|||
return NullAssignTo(dst)
|
||||
}
|
||||
|
||||
return errors.Errorf("cannot decode %v into %T", src, dst)
|
||||
return errors.Errorf("cannot decode %#v into %T", src, dst)
|
||||
}
|
||||
|
||||
func (dst *UUIDArray) DecodeText(ci *ConnInfo, src []byte) error {
|
||||
|
|
|
@ -86,7 +86,7 @@ func (src *VarcharArray) AssignTo(dst interface{}) error {
|
|||
return NullAssignTo(dst)
|
||||
}
|
||||
|
||||
return errors.Errorf("cannot decode %v into %T", src, dst)
|
||||
return errors.Errorf("cannot decode %#v into %T", src, dst)
|
||||
}
|
||||
|
||||
func (dst *VarcharArray) DecodeText(ci *ConnInfo, src []byte) error {
|
||||
|
|
Loading…
Reference in New Issue