diff --git a/aclitem.go b/aclitem.go index c801eb83..123e86b6 100644 --- a/aclitem.go +++ b/aclitem.go @@ -84,7 +84,7 @@ func (dst *ACLItem) DecodeText(ci *ConnInfo, src []byte) error { return nil } -func (src *ACLItem) EncodeText(ci *ConnInfo, buf []byte) ([]byte, error) { +func (src ACLItem) EncodeText(ci *ConnInfo, buf []byte) ([]byte, error) { switch src.Status { case Null: return nil, nil @@ -115,7 +115,7 @@ func (dst *ACLItem) Scan(src interface{}) error { } // Value implements the database/sql/driver Valuer interface. -func (src *ACLItem) Value() (driver.Value, error) { +func (src ACLItem) Value() (driver.Value, error) { switch src.Status { case Present: return src.String, nil diff --git a/aclitem_array.go b/aclitem_array.go index c8421153..e8142091 100644 --- a/aclitem_array.go +++ b/aclitem_array.go @@ -124,7 +124,7 @@ func (dst *ACLItemArray) DecodeText(ci *ConnInfo, src []byte) error { return nil } -func (src *ACLItemArray) EncodeText(ci *ConnInfo, buf []byte) ([]byte, error) { +func (src ACLItemArray) EncodeText(ci *ConnInfo, buf []byte) ([]byte, error) { switch src.Status { case Null: return nil, nil @@ -200,7 +200,7 @@ func (dst *ACLItemArray) Scan(src interface{}) error { } // Value implements the database/sql/driver Valuer interface. -func (src *ACLItemArray) Value() (driver.Value, error) { +func (src ACLItemArray) Value() (driver.Value, error) { buf, err := src.EncodeText(nil, nil) if err != nil { return nil, err diff --git a/array.go b/array.go index 69456782..bd3a993b 100644 --- a/array.go +++ b/array.go @@ -60,7 +60,7 @@ func (dst *ArrayHeader) DecodeBinary(ci *ConnInfo, src []byte) (int, error) { return rp, nil } -func (src *ArrayHeader) EncodeBinary(ci *ConnInfo, buf []byte) []byte { +func (src ArrayHeader) EncodeBinary(ci *ConnInfo, buf []byte) []byte { buf = pgio.AppendInt32(buf, int32(len(src.Dimensions))) var containsNull int32 diff --git a/bit.go b/bit.go index f892cee5..4f40a532 100644 --- a/bit.go +++ b/bit.go @@ -22,8 +22,8 @@ func (dst *Bit) DecodeBinary(ci *ConnInfo, src []byte) error { return (*Varbit)(dst).DecodeBinary(ci, src) } -func (src *Bit) EncodeBinary(ci *ConnInfo, buf []byte) ([]byte, error) { - return (*Varbit)(src).EncodeBinary(ci, buf) +func (src Bit) EncodeBinary(ci *ConnInfo, buf []byte) ([]byte, error) { + return (Varbit)(src).EncodeBinary(ci, buf) } // Scan implements the database/sql Scanner interface. @@ -32,6 +32,6 @@ func (dst *Bit) Scan(src interface{}) error { } // Value implements the database/sql/driver Valuer interface. -func (src *Bit) Value() (driver.Value, error) { - return (*Varbit)(src).Value() +func (src Bit) Value() (driver.Value, error) { + return (Varbit)(src).Value() } diff --git a/bool.go b/bool.go index f622061b..ad55dce4 100644 --- a/bool.go +++ b/bool.go @@ -96,7 +96,7 @@ func (dst *Bool) DecodeBinary(ci *ConnInfo, src []byte) error { return nil } -func (src *Bool) EncodeText(ci *ConnInfo, buf []byte) ([]byte, error) { +func (src Bool) EncodeText(ci *ConnInfo, buf []byte) ([]byte, error) { switch src.Status { case Null: return nil, nil @@ -113,7 +113,7 @@ func (src *Bool) EncodeText(ci *ConnInfo, buf []byte) ([]byte, error) { return buf, nil } -func (src *Bool) EncodeBinary(ci *ConnInfo, buf []byte) ([]byte, error) { +func (src Bool) EncodeBinary(ci *ConnInfo, buf []byte) ([]byte, error) { switch src.Status { case Null: return nil, nil @@ -153,7 +153,7 @@ func (dst *Bool) Scan(src interface{}) error { } // Value implements the database/sql/driver Valuer interface. -func (src *Bool) Value() (driver.Value, error) { +func (src Bool) Value() (driver.Value, error) { switch src.Status { case Present: return src.Bool, nil diff --git a/bool_array.go b/bool_array.go index 3dde8dc0..ba453254 100644 --- a/bool_array.go +++ b/bool_array.go @@ -168,7 +168,7 @@ func (dst *BoolArray) DecodeBinary(ci *ConnInfo, src []byte) error { return nil } -func (src *BoolArray) EncodeText(ci *ConnInfo, buf []byte) ([]byte, error) { +func (src BoolArray) EncodeText(ci *ConnInfo, buf []byte) ([]byte, error) { switch src.Status { case Null: return nil, nil @@ -225,7 +225,7 @@ func (src *BoolArray) EncodeText(ci *ConnInfo, buf []byte) ([]byte, error) { return buf, nil } -func (src *BoolArray) EncodeBinary(ci *ConnInfo, buf []byte) ([]byte, error) { +func (src BoolArray) EncodeBinary(ci *ConnInfo, buf []byte) ([]byte, error) { switch src.Status { case Null: return nil, nil @@ -288,7 +288,7 @@ func (dst *BoolArray) Scan(src interface{}) error { } // Value implements the database/sql/driver Valuer interface. -func (src *BoolArray) Value() (driver.Value, error) { +func (src BoolArray) Value() (driver.Value, error) { buf, err := src.EncodeText(nil, nil) if err != nil { return nil, err diff --git a/box.go b/box.go index ce5300e5..9baabf6b 100644 --- a/box.go +++ b/box.go @@ -108,7 +108,7 @@ func (dst *Box) DecodeBinary(ci *ConnInfo, src []byte) error { return nil } -func (src *Box) EncodeText(ci *ConnInfo, buf []byte) ([]byte, error) { +func (src Box) EncodeText(ci *ConnInfo, buf []byte) ([]byte, error) { switch src.Status { case Null: return nil, nil @@ -125,7 +125,7 @@ func (src *Box) EncodeText(ci *ConnInfo, buf []byte) ([]byte, error) { return buf, nil } -func (src *Box) EncodeBinary(ci *ConnInfo, buf []byte) ([]byte, error) { +func (src Box) EncodeBinary(ci *ConnInfo, buf []byte) ([]byte, error) { switch src.Status { case Null: return nil, nil @@ -161,6 +161,6 @@ func (dst *Box) Scan(src interface{}) error { } // Value implements the database/sql/driver Valuer interface. -func (src *Box) Value() (driver.Value, error) { +func (src Box) Value() (driver.Value, error) { return EncodeValueText(src) } diff --git a/bpchar.go b/bpchar.go index 21263184..1a85fa0d 100644 --- a/bpchar.go +++ b/bpchar.go @@ -41,12 +41,12 @@ func (dst *BPChar) DecodeBinary(ci *ConnInfo, src []byte) error { return (*Text)(dst).DecodeBinary(ci, src) } -func (src *BPChar) EncodeText(ci *ConnInfo, buf []byte) ([]byte, error) { - return (*Text)(src).EncodeText(ci, buf) +func (src BPChar) EncodeText(ci *ConnInfo, buf []byte) ([]byte, error) { + return (Text)(src).EncodeText(ci, buf) } -func (src *BPChar) EncodeBinary(ci *ConnInfo, buf []byte) ([]byte, error) { - return (*Text)(src).EncodeBinary(ci, buf) +func (src BPChar) EncodeBinary(ci *ConnInfo, buf []byte) ([]byte, error) { + return (Text)(src).EncodeBinary(ci, buf) } // Scan implements the database/sql Scanner interface. @@ -55,12 +55,12 @@ func (dst *BPChar) Scan(src interface{}) error { } // Value implements the database/sql/driver Valuer interface. -func (src *BPChar) Value() (driver.Value, error) { - return (*Text)(src).Value() +func (src BPChar) Value() (driver.Value, error) { + return (Text)(src).Value() } -func (src *BPChar) MarshalJSON() ([]byte, error) { - return (*Text)(src).MarshalJSON() +func (src BPChar) MarshalJSON() ([]byte, error) { + return (Text)(src).MarshalJSON() } func (dst *BPChar) UnmarshalJSON(b []byte) error { diff --git a/bpchar_array.go b/bpchar_array.go index 547b4e80..da601d0d 100644 --- a/bpchar_array.go +++ b/bpchar_array.go @@ -168,7 +168,7 @@ func (dst *BPCharArray) DecodeBinary(ci *ConnInfo, src []byte) error { return nil } -func (src *BPCharArray) EncodeText(ci *ConnInfo, buf []byte) ([]byte, error) { +func (src BPCharArray) EncodeText(ci *ConnInfo, buf []byte) ([]byte, error) { switch src.Status { case Null: return nil, nil @@ -225,7 +225,7 @@ func (src *BPCharArray) EncodeText(ci *ConnInfo, buf []byte) ([]byte, error) { return buf, nil } -func (src *BPCharArray) EncodeBinary(ci *ConnInfo, buf []byte) ([]byte, error) { +func (src BPCharArray) EncodeBinary(ci *ConnInfo, buf []byte) ([]byte, error) { switch src.Status { case Null: return nil, nil @@ -288,7 +288,7 @@ func (dst *BPCharArray) Scan(src interface{}) error { } // Value implements the database/sql/driver Valuer interface. -func (src *BPCharArray) Value() (driver.Value, error) { +func (src BPCharArray) Value() (driver.Value, error) { buf, err := src.EncodeText(nil, nil) if err != nil { return nil, err diff --git a/bytea.go b/bytea.go index e6c28dc7..c6e79cdf 100644 --- a/bytea.go +++ b/bytea.go @@ -100,7 +100,7 @@ func (dst *Bytea) DecodeBinary(ci *ConnInfo, src []byte) error { return nil } -func (src *Bytea) EncodeText(ci *ConnInfo, buf []byte) ([]byte, error) { +func (src Bytea) EncodeText(ci *ConnInfo, buf []byte) ([]byte, error) { switch src.Status { case Null: return nil, nil @@ -113,7 +113,7 @@ func (src *Bytea) EncodeText(ci *ConnInfo, buf []byte) ([]byte, error) { return buf, nil } -func (src *Bytea) EncodeBinary(ci *ConnInfo, buf []byte) ([]byte, error) { +func (src Bytea) EncodeBinary(ci *ConnInfo, buf []byte) ([]byte, error) { switch src.Status { case Null: return nil, nil @@ -145,7 +145,7 @@ func (dst *Bytea) Scan(src interface{}) error { } // Value implements the database/sql/driver Valuer interface. -func (src *Bytea) Value() (driver.Value, error) { +func (src Bytea) Value() (driver.Value, error) { switch src.Status { case Present: return src.Bytes, nil diff --git a/bytea_array.go b/bytea_array.go index 369d6e08..1c2f6548 100644 --- a/bytea_array.go +++ b/bytea_array.go @@ -168,7 +168,7 @@ func (dst *ByteaArray) DecodeBinary(ci *ConnInfo, src []byte) error { return nil } -func (src *ByteaArray) EncodeText(ci *ConnInfo, buf []byte) ([]byte, error) { +func (src ByteaArray) EncodeText(ci *ConnInfo, buf []byte) ([]byte, error) { switch src.Status { case Null: return nil, nil @@ -225,7 +225,7 @@ func (src *ByteaArray) EncodeText(ci *ConnInfo, buf []byte) ([]byte, error) { return buf, nil } -func (src *ByteaArray) EncodeBinary(ci *ConnInfo, buf []byte) ([]byte, error) { +func (src ByteaArray) EncodeBinary(ci *ConnInfo, buf []byte) ([]byte, error) { switch src.Status { case Null: return nil, nil @@ -288,7 +288,7 @@ func (dst *ByteaArray) Scan(src interface{}) error { } // Value implements the database/sql/driver Valuer interface. -func (src *ByteaArray) Value() (driver.Value, error) { +func (src ByteaArray) Value() (driver.Value, error) { buf, err := src.EncodeText(nil, nil) if err != nil { return nil, err diff --git a/cid.go b/cid.go index 0ed54f44..d27982bd 100644 --- a/cid.go +++ b/cid.go @@ -42,12 +42,12 @@ func (dst *CID) DecodeBinary(ci *ConnInfo, src []byte) error { return (*pguint32)(dst).DecodeBinary(ci, src) } -func (src *CID) EncodeText(ci *ConnInfo, buf []byte) ([]byte, error) { - return (*pguint32)(src).EncodeText(ci, buf) +func (src CID) EncodeText(ci *ConnInfo, buf []byte) ([]byte, error) { + return (pguint32)(src).EncodeText(ci, buf) } -func (src *CID) EncodeBinary(ci *ConnInfo, buf []byte) ([]byte, error) { - return (*pguint32)(src).EncodeBinary(ci, buf) +func (src CID) EncodeBinary(ci *ConnInfo, buf []byte) ([]byte, error) { + return (pguint32)(src).EncodeBinary(ci, buf) } // Scan implements the database/sql Scanner interface. @@ -56,6 +56,6 @@ func (dst *CID) Scan(src interface{}) error { } // Value implements the database/sql/driver Valuer interface. -func (src *CID) Value() (driver.Value, error) { - return (*pguint32)(src).Value() +func (src CID) Value() (driver.Value, error) { + return (pguint32)(src).Value() } diff --git a/cidr.go b/cidr.go index 519b9cae..9e13a97e 100644 --- a/cidr.go +++ b/cidr.go @@ -22,10 +22,10 @@ func (dst *CIDR) DecodeBinary(ci *ConnInfo, src []byte) error { return (*Inet)(dst).DecodeBinary(ci, src) } -func (src *CIDR) EncodeText(ci *ConnInfo, buf []byte) ([]byte, error) { - return (*Inet)(src).EncodeText(ci, buf) +func (src CIDR) EncodeText(ci *ConnInfo, buf []byte) ([]byte, error) { + return (Inet)(src).EncodeText(ci, buf) } -func (src *CIDR) EncodeBinary(ci *ConnInfo, buf []byte) ([]byte, error) { - return (*Inet)(src).EncodeBinary(ci, buf) +func (src CIDR) EncodeBinary(ci *ConnInfo, buf []byte) ([]byte, error) { + return (Inet)(src).EncodeBinary(ci, buf) } diff --git a/cidr_array.go b/cidr_array.go index 94c07679..234c6aff 100644 --- a/cidr_array.go +++ b/cidr_array.go @@ -197,7 +197,7 @@ func (dst *CIDRArray) DecodeBinary(ci *ConnInfo, src []byte) error { return nil } -func (src *CIDRArray) EncodeText(ci *ConnInfo, buf []byte) ([]byte, error) { +func (src CIDRArray) EncodeText(ci *ConnInfo, buf []byte) ([]byte, error) { switch src.Status { case Null: return nil, nil @@ -254,7 +254,7 @@ func (src *CIDRArray) EncodeText(ci *ConnInfo, buf []byte) ([]byte, error) { return buf, nil } -func (src *CIDRArray) EncodeBinary(ci *ConnInfo, buf []byte) ([]byte, error) { +func (src CIDRArray) EncodeBinary(ci *ConnInfo, buf []byte) ([]byte, error) { switch src.Status { case Null: return nil, nil @@ -317,7 +317,7 @@ func (dst *CIDRArray) Scan(src interface{}) error { } // Value implements the database/sql/driver Valuer interface. -func (src *CIDRArray) Value() (driver.Value, error) { +func (src CIDRArray) Value() (driver.Value, error) { buf, err := src.EncodeText(nil, nil) if err != nil { return nil, err diff --git a/circle.go b/circle.go index 66dec132..9644345c 100644 --- a/circle.go +++ b/circle.go @@ -95,7 +95,7 @@ func (dst *Circle) DecodeBinary(ci *ConnInfo, src []byte) error { return nil } -func (src *Circle) EncodeText(ci *ConnInfo, buf []byte) ([]byte, error) { +func (src Circle) EncodeText(ci *ConnInfo, buf []byte) ([]byte, error) { switch src.Status { case Null: return nil, nil @@ -112,7 +112,7 @@ func (src *Circle) EncodeText(ci *ConnInfo, buf []byte) ([]byte, error) { return buf, nil } -func (src *Circle) EncodeBinary(ci *ConnInfo, buf []byte) ([]byte, error) { +func (src Circle) EncodeBinary(ci *ConnInfo, buf []byte) ([]byte, error) { switch src.Status { case Null: return nil, nil @@ -146,6 +146,6 @@ func (dst *Circle) Scan(src interface{}) error { } // Value implements the database/sql/driver Valuer interface. -func (src *Circle) Value() (driver.Value, error) { +func (src Circle) Value() (driver.Value, error) { return EncodeValueText(src) } diff --git a/date.go b/date.go index 08ba8c08..8e35b22a 100644 --- a/date.go +++ b/date.go @@ -125,7 +125,7 @@ func (dst *Date) DecodeBinary(ci *ConnInfo, src []byte) error { return nil } -func (src *Date) EncodeText(ci *ConnInfo, buf []byte) ([]byte, error) { +func (src Date) EncodeText(ci *ConnInfo, buf []byte) ([]byte, error) { switch src.Status { case Null: return nil, nil @@ -147,7 +147,7 @@ func (src *Date) EncodeText(ci *ConnInfo, buf []byte) ([]byte, error) { return append(buf, s...), nil } -func (src *Date) EncodeBinary(ci *ConnInfo, buf []byte) ([]byte, error) { +func (src Date) EncodeBinary(ci *ConnInfo, buf []byte) ([]byte, error) { switch src.Status { case Null: return nil, nil @@ -195,7 +195,7 @@ func (dst *Date) Scan(src interface{}) error { } // Value implements the database/sql/driver Valuer interface. -func (src *Date) Value() (driver.Value, error) { +func (src Date) Value() (driver.Value, error) { switch src.Status { case Present: if src.InfinityModifier != None { diff --git a/date_array.go b/date_array.go index 05070360..69fc3e5e 100644 --- a/date_array.go +++ b/date_array.go @@ -169,7 +169,7 @@ func (dst *DateArray) DecodeBinary(ci *ConnInfo, src []byte) error { return nil } -func (src *DateArray) EncodeText(ci *ConnInfo, buf []byte) ([]byte, error) { +func (src DateArray) EncodeText(ci *ConnInfo, buf []byte) ([]byte, error) { switch src.Status { case Null: return nil, nil @@ -226,7 +226,7 @@ func (src *DateArray) EncodeText(ci *ConnInfo, buf []byte) ([]byte, error) { return buf, nil } -func (src *DateArray) EncodeBinary(ci *ConnInfo, buf []byte) ([]byte, error) { +func (src DateArray) EncodeBinary(ci *ConnInfo, buf []byte) ([]byte, error) { switch src.Status { case Null: return nil, nil @@ -289,7 +289,7 @@ func (dst *DateArray) Scan(src interface{}) error { } // Value implements the database/sql/driver Valuer interface. -func (src *DateArray) Value() (driver.Value, error) { +func (src DateArray) Value() (driver.Value, error) { buf, err := src.EncodeText(nil, nil) if err != nil { return nil, err diff --git a/enum_array.go b/enum_array.go index 504d513c..f4609169 100644 --- a/enum_array.go +++ b/enum_array.go @@ -124,7 +124,7 @@ func (dst *EnumArray) DecodeText(ci *ConnInfo, src []byte) error { return nil } -func (src *EnumArray) EncodeText(ci *ConnInfo, buf []byte) ([]byte, error) { +func (src EnumArray) EncodeText(ci *ConnInfo, buf []byte) ([]byte, error) { switch src.Status { case Null: return nil, nil @@ -200,7 +200,7 @@ func (dst *EnumArray) Scan(src interface{}) error { } // Value implements the database/sql/driver Valuer interface. -func (src *EnumArray) Value() (driver.Value, error) { +func (src EnumArray) Value() (driver.Value, error) { buf, err := src.EncodeText(nil, nil) if err != nil { return nil, err diff --git a/ext/satori-uuid/uuid.go b/ext/satori-uuid/uuid.go index 01adea23..9b958b58 100644 --- a/ext/satori-uuid/uuid.go +++ b/ext/satori-uuid/uuid.go @@ -117,7 +117,7 @@ func (dst *UUID) DecodeBinary(ci *pgtype.ConnInfo, src []byte) error { return nil } -func (src *UUID) EncodeText(ci *pgtype.ConnInfo, buf []byte) ([]byte, error) { +func (src UUID) EncodeText(ci *pgtype.ConnInfo, buf []byte) ([]byte, error) { switch src.Status { case pgtype.Null: return nil, nil @@ -128,7 +128,7 @@ func (src *UUID) EncodeText(ci *pgtype.ConnInfo, buf []byte) ([]byte, error) { return append(buf, src.UUID.String()...), nil } -func (src *UUID) EncodeBinary(ci *pgtype.ConnInfo, buf []byte) ([]byte, error) { +func (src UUID) EncodeBinary(ci *pgtype.ConnInfo, buf []byte) ([]byte, error) { switch src.Status { case pgtype.Null: return nil, nil @@ -157,6 +157,6 @@ func (dst *UUID) Scan(src interface{}) error { } // Value implements the database/sql/driver Valuer interface. -func (src *UUID) Value() (driver.Value, error) { +func (src UUID) Value() (driver.Value, error) { return pgtype.EncodeValueText(src) } diff --git a/ext/shopspring-numeric/decimal.go b/ext/shopspring-numeric/decimal.go index d8f176a8..c035b15b 100644 --- a/ext/shopspring-numeric/decimal.go +++ b/ext/shopspring-numeric/decimal.go @@ -257,7 +257,7 @@ func (dst *Numeric) DecodeBinary(ci *pgtype.ConnInfo, src []byte) error { return nil } -func (src *Numeric) EncodeText(ci *pgtype.ConnInfo, buf []byte) ([]byte, error) { +func (src Numeric) EncodeText(ci *pgtype.ConnInfo, buf []byte) ([]byte, error) { switch src.Status { case pgtype.Null: return nil, nil @@ -268,7 +268,7 @@ func (src *Numeric) EncodeText(ci *pgtype.ConnInfo, buf []byte) ([]byte, error) return append(buf, src.Decimal.String()...), nil } -func (src *Numeric) EncodeBinary(ci *pgtype.ConnInfo, buf []byte) ([]byte, error) { +func (src Numeric) EncodeBinary(ci *pgtype.ConnInfo, buf []byte) ([]byte, error) { switch src.Status { case pgtype.Null: return nil, nil @@ -306,7 +306,7 @@ func (dst *Numeric) Scan(src interface{}) error { } // Value implements the database/sql/driver Valuer interface. -func (src *Numeric) Value() (driver.Value, error) { +func (src Numeric) Value() (driver.Value, error) { switch src.Status { case pgtype.Present: return src.Decimal.Value() diff --git a/float4.go b/float4.go index 0947f36a..3f701dc5 100644 --- a/float4.go +++ b/float4.go @@ -138,7 +138,7 @@ func (dst *Float4) DecodeBinary(ci *ConnInfo, src []byte) error { return nil } -func (src *Float4) EncodeText(ci *ConnInfo, buf []byte) ([]byte, error) { +func (src Float4) EncodeText(ci *ConnInfo, buf []byte) ([]byte, error) { switch src.Status { case Null: return nil, nil @@ -150,7 +150,7 @@ func (src *Float4) EncodeText(ci *ConnInfo, buf []byte) ([]byte, error) { return buf, nil } -func (src *Float4) EncodeBinary(ci *ConnInfo, buf []byte) ([]byte, error) { +func (src Float4) EncodeBinary(ci *ConnInfo, buf []byte) ([]byte, error) { switch src.Status { case Null: return nil, nil @@ -185,7 +185,7 @@ func (dst *Float4) Scan(src interface{}) error { } // Value implements the database/sql/driver Valuer interface. -func (src *Float4) Value() (driver.Value, error) { +func (src Float4) Value() (driver.Value, error) { switch src.Status { case Present: return float64(src.Float), nil diff --git a/float4_array.go b/float4_array.go index ef134407..80aff879 100644 --- a/float4_array.go +++ b/float4_array.go @@ -168,7 +168,7 @@ func (dst *Float4Array) DecodeBinary(ci *ConnInfo, src []byte) error { return nil } -func (src *Float4Array) EncodeText(ci *ConnInfo, buf []byte) ([]byte, error) { +func (src Float4Array) EncodeText(ci *ConnInfo, buf []byte) ([]byte, error) { switch src.Status { case Null: return nil, nil @@ -225,7 +225,7 @@ func (src *Float4Array) EncodeText(ci *ConnInfo, buf []byte) ([]byte, error) { return buf, nil } -func (src *Float4Array) EncodeBinary(ci *ConnInfo, buf []byte) ([]byte, error) { +func (src Float4Array) EncodeBinary(ci *ConnInfo, buf []byte) ([]byte, error) { switch src.Status { case Null: return nil, nil @@ -288,7 +288,7 @@ func (dst *Float4Array) Scan(src interface{}) error { } // Value implements the database/sql/driver Valuer interface. -func (src *Float4Array) Value() (driver.Value, error) { +func (src Float4Array) Value() (driver.Value, error) { buf, err := src.EncodeText(nil, nil) if err != nil { return nil, err diff --git a/float8.go b/float8.go index 87cf6adb..9c6847c3 100644 --- a/float8.go +++ b/float8.go @@ -128,7 +128,7 @@ func (dst *Float8) DecodeBinary(ci *ConnInfo, src []byte) error { return nil } -func (src *Float8) EncodeText(ci *ConnInfo, buf []byte) ([]byte, error) { +func (src Float8) EncodeText(ci *ConnInfo, buf []byte) ([]byte, error) { switch src.Status { case Null: return nil, nil @@ -140,7 +140,7 @@ func (src *Float8) EncodeText(ci *ConnInfo, buf []byte) ([]byte, error) { return buf, nil } -func (src *Float8) EncodeBinary(ci *ConnInfo, buf []byte) ([]byte, error) { +func (src Float8) EncodeBinary(ci *ConnInfo, buf []byte) ([]byte, error) { switch src.Status { case Null: return nil, nil @@ -175,7 +175,7 @@ func (dst *Float8) Scan(src interface{}) error { } // Value implements the database/sql/driver Valuer interface. -func (src *Float8) Value() (driver.Value, error) { +func (src Float8) Value() (driver.Value, error) { switch src.Status { case Present: return src.Float, nil diff --git a/float8_array.go b/float8_array.go index ba63449c..3999cf7d 100644 --- a/float8_array.go +++ b/float8_array.go @@ -168,7 +168,7 @@ func (dst *Float8Array) DecodeBinary(ci *ConnInfo, src []byte) error { return nil } -func (src *Float8Array) EncodeText(ci *ConnInfo, buf []byte) ([]byte, error) { +func (src Float8Array) EncodeText(ci *ConnInfo, buf []byte) ([]byte, error) { switch src.Status { case Null: return nil, nil @@ -225,7 +225,7 @@ func (src *Float8Array) EncodeText(ci *ConnInfo, buf []byte) ([]byte, error) { return buf, nil } -func (src *Float8Array) EncodeBinary(ci *ConnInfo, buf []byte) ([]byte, error) { +func (src Float8Array) EncodeBinary(ci *ConnInfo, buf []byte) ([]byte, error) { switch src.Status { case Null: return nil, nil @@ -288,7 +288,7 @@ func (dst *Float8Array) Scan(src interface{}) error { } // Value implements the database/sql/driver Valuer interface. -func (src *Float8Array) Value() (driver.Value, error) { +func (src Float8Array) Value() (driver.Value, error) { buf, err := src.EncodeText(nil, nil) if err != nil { return nil, err diff --git a/generic_binary.go b/generic_binary.go index 2596ecae..5689523e 100644 --- a/generic_binary.go +++ b/generic_binary.go @@ -24,8 +24,8 @@ func (dst *GenericBinary) DecodeBinary(ci *ConnInfo, src []byte) error { return (*Bytea)(dst).DecodeBinary(ci, src) } -func (src *GenericBinary) EncodeBinary(ci *ConnInfo, buf []byte) ([]byte, error) { - return (*Bytea)(src).EncodeBinary(ci, buf) +func (src GenericBinary) EncodeBinary(ci *ConnInfo, buf []byte) ([]byte, error) { + return (Bytea)(src).EncodeBinary(ci, buf) } // Scan implements the database/sql Scanner interface. @@ -34,6 +34,6 @@ func (dst *GenericBinary) Scan(src interface{}) error { } // Value implements the database/sql/driver Valuer interface. -func (src *GenericBinary) Value() (driver.Value, error) { - return (*Bytea)(src).Value() +func (src GenericBinary) Value() (driver.Value, error) { + return (Bytea)(src).Value() } diff --git a/generic_text.go b/generic_text.go index 0e3db9de..d8890f48 100644 --- a/generic_text.go +++ b/generic_text.go @@ -24,8 +24,8 @@ func (dst *GenericText) DecodeText(ci *ConnInfo, src []byte) error { return (*Text)(dst).DecodeText(ci, src) } -func (src *GenericText) EncodeText(ci *ConnInfo, buf []byte) ([]byte, error) { - return (*Text)(src).EncodeText(ci, buf) +func (src GenericText) EncodeText(ci *ConnInfo, buf []byte) ([]byte, error) { + return (Text)(src).EncodeText(ci, buf) } // Scan implements the database/sql Scanner interface. @@ -34,6 +34,6 @@ func (dst *GenericText) Scan(src interface{}) error { } // Value implements the database/sql/driver Valuer interface. -func (src *GenericText) Value() (driver.Value, error) { - return (*Text)(src).Value() +func (src GenericText) Value() (driver.Value, error) { + return (Text)(src).Value() } diff --git a/hstore.go b/hstore.go index 56af38ee..45b165af 100644 --- a/hstore.go +++ b/hstore.go @@ -151,7 +151,7 @@ func (dst *Hstore) DecodeBinary(ci *ConnInfo, src []byte) error { return nil } -func (src *Hstore) EncodeText(ci *ConnInfo, buf []byte) ([]byte, error) { +func (src Hstore) EncodeText(ci *ConnInfo, buf []byte) ([]byte, error) { switch src.Status { case Null: return nil, nil @@ -186,7 +186,7 @@ func (src *Hstore) EncodeText(ci *ConnInfo, buf []byte) ([]byte, error) { return buf, nil } -func (src *Hstore) EncodeBinary(ci *ConnInfo, buf []byte) ([]byte, error) { +func (src Hstore) EncodeBinary(ci *ConnInfo, buf []byte) ([]byte, error) { switch src.Status { case Null: return nil, nil @@ -426,6 +426,6 @@ func (dst *Hstore) Scan(src interface{}) error { } // Value implements the database/sql/driver Valuer interface. -func (src *Hstore) Value() (driver.Value, error) { +func (src Hstore) Value() (driver.Value, error) { return EncodeValueText(src) } diff --git a/hstore_array.go b/hstore_array.go index 1bdac816..8269fb40 100644 --- a/hstore_array.go +++ b/hstore_array.go @@ -168,7 +168,7 @@ func (dst *HstoreArray) DecodeBinary(ci *ConnInfo, src []byte) error { return nil } -func (src *HstoreArray) EncodeText(ci *ConnInfo, buf []byte) ([]byte, error) { +func (src HstoreArray) EncodeText(ci *ConnInfo, buf []byte) ([]byte, error) { switch src.Status { case Null: return nil, nil @@ -225,7 +225,7 @@ func (src *HstoreArray) EncodeText(ci *ConnInfo, buf []byte) ([]byte, error) { return buf, nil } -func (src *HstoreArray) EncodeBinary(ci *ConnInfo, buf []byte) ([]byte, error) { +func (src HstoreArray) EncodeBinary(ci *ConnInfo, buf []byte) ([]byte, error) { switch src.Status { case Null: return nil, nil @@ -288,7 +288,7 @@ func (dst *HstoreArray) Scan(src interface{}) error { } // Value implements the database/sql/driver Valuer interface. -func (src *HstoreArray) Value() (driver.Value, error) { +func (src HstoreArray) Value() (driver.Value, error) { buf, err := src.EncodeText(nil, nil) if err != nil { return nil, err diff --git a/inet.go b/inet.go index 0fb1c418..3c2eda9b 100644 --- a/inet.go +++ b/inet.go @@ -148,7 +148,7 @@ func (dst *Inet) DecodeBinary(ci *ConnInfo, src []byte) error { return nil } -func (src *Inet) EncodeText(ci *ConnInfo, buf []byte) ([]byte, error) { +func (src Inet) EncodeText(ci *ConnInfo, buf []byte) ([]byte, error) { switch src.Status { case Null: return nil, nil @@ -160,7 +160,7 @@ func (src *Inet) EncodeText(ci *ConnInfo, buf []byte) ([]byte, error) { } // EncodeBinary encodes src into w. -func (src *Inet) EncodeBinary(ci *ConnInfo, buf []byte) ([]byte, error) { +func (src Inet) EncodeBinary(ci *ConnInfo, buf []byte) ([]byte, error) { switch src.Status { case Null: return nil, nil @@ -211,6 +211,6 @@ func (dst *Inet) Scan(src interface{}) error { } // Value implements the database/sql/driver Valuer interface. -func (src *Inet) Value() (driver.Value, error) { +func (src Inet) Value() (driver.Value, error) { return EncodeValueText(src) } diff --git a/inet_array.go b/inet_array.go index b31d3588..a6fd419e 100644 --- a/inet_array.go +++ b/inet_array.go @@ -197,7 +197,7 @@ func (dst *InetArray) DecodeBinary(ci *ConnInfo, src []byte) error { return nil } -func (src *InetArray) EncodeText(ci *ConnInfo, buf []byte) ([]byte, error) { +func (src InetArray) EncodeText(ci *ConnInfo, buf []byte) ([]byte, error) { switch src.Status { case Null: return nil, nil @@ -254,7 +254,7 @@ func (src *InetArray) EncodeText(ci *ConnInfo, buf []byte) ([]byte, error) { return buf, nil } -func (src *InetArray) EncodeBinary(ci *ConnInfo, buf []byte) ([]byte, error) { +func (src InetArray) EncodeBinary(ci *ConnInfo, buf []byte) ([]byte, error) { switch src.Status { case Null: return nil, nil @@ -317,7 +317,7 @@ func (dst *InetArray) Scan(src interface{}) error { } // Value implements the database/sql/driver Valuer interface. -func (src *InetArray) Value() (driver.Value, error) { +func (src InetArray) Value() (driver.Value, error) { buf, err := src.EncodeText(nil, nil) if err != nil { return nil, err diff --git a/int2.go b/int2.go index bbf2952f..f3e01308 100644 --- a/int2.go +++ b/int2.go @@ -133,7 +133,7 @@ func (dst *Int2) DecodeBinary(ci *ConnInfo, src []byte) error { return nil } -func (src *Int2) EncodeText(ci *ConnInfo, buf []byte) ([]byte, error) { +func (src Int2) EncodeText(ci *ConnInfo, buf []byte) ([]byte, error) { switch src.Status { case Null: return nil, nil @@ -144,7 +144,7 @@ func (src *Int2) EncodeText(ci *ConnInfo, buf []byte) ([]byte, error) { return append(buf, strconv.FormatInt(int64(src.Int), 10)...), nil } -func (src *Int2) EncodeBinary(ci *ConnInfo, buf []byte) ([]byte, error) { +func (src Int2) EncodeBinary(ci *ConnInfo, buf []byte) ([]byte, error) { switch src.Status { case Null: return nil, nil @@ -184,7 +184,7 @@ func (dst *Int2) Scan(src interface{}) error { } // Value implements the database/sql/driver Valuer interface. -func (src *Int2) Value() (driver.Value, error) { +func (src Int2) Value() (driver.Value, error) { switch src.Status { case Present: return int64(src.Int), nil @@ -195,7 +195,7 @@ func (src *Int2) Value() (driver.Value, error) { } } -func (src *Int2) MarshalJSON() ([]byte, error) { +func (src Int2) MarshalJSON() ([]byte, error) { switch src.Status { case Present: return []byte(strconv.FormatInt(int64(src.Int), 10)), nil diff --git a/int2_array.go b/int2_array.go index afb39513..beea543f 100644 --- a/int2_array.go +++ b/int2_array.go @@ -196,7 +196,7 @@ func (dst *Int2Array) DecodeBinary(ci *ConnInfo, src []byte) error { return nil } -func (src *Int2Array) EncodeText(ci *ConnInfo, buf []byte) ([]byte, error) { +func (src Int2Array) EncodeText(ci *ConnInfo, buf []byte) ([]byte, error) { switch src.Status { case Null: return nil, nil @@ -253,7 +253,7 @@ func (src *Int2Array) EncodeText(ci *ConnInfo, buf []byte) ([]byte, error) { return buf, nil } -func (src *Int2Array) EncodeBinary(ci *ConnInfo, buf []byte) ([]byte, error) { +func (src Int2Array) EncodeBinary(ci *ConnInfo, buf []byte) ([]byte, error) { switch src.Status { case Null: return nil, nil @@ -316,7 +316,7 @@ func (dst *Int2Array) Scan(src interface{}) error { } // Value implements the database/sql/driver Valuer interface. -func (src *Int2Array) Value() (driver.Value, error) { +func (src Int2Array) Value() (driver.Value, error) { buf, err := src.EncodeText(nil, nil) if err != nil { return nil, err diff --git a/int4.go b/int4.go index cc34ce0a..da39b7f0 100644 --- a/int4.go +++ b/int4.go @@ -125,7 +125,7 @@ func (dst *Int4) DecodeBinary(ci *ConnInfo, src []byte) error { return nil } -func (src *Int4) EncodeText(ci *ConnInfo, buf []byte) ([]byte, error) { +func (src Int4) EncodeText(ci *ConnInfo, buf []byte) ([]byte, error) { switch src.Status { case Null: return nil, nil @@ -136,7 +136,7 @@ func (src *Int4) EncodeText(ci *ConnInfo, buf []byte) ([]byte, error) { return append(buf, strconv.FormatInt(int64(src.Int), 10)...), nil } -func (src *Int4) EncodeBinary(ci *ConnInfo, buf []byte) ([]byte, error) { +func (src Int4) EncodeBinary(ci *ConnInfo, buf []byte) ([]byte, error) { switch src.Status { case Null: return nil, nil @@ -176,7 +176,7 @@ func (dst *Int4) Scan(src interface{}) error { } // Value implements the database/sql/driver Valuer interface. -func (src *Int4) Value() (driver.Value, error) { +func (src Int4) Value() (driver.Value, error) { switch src.Status { case Present: return int64(src.Int), nil @@ -187,7 +187,7 @@ func (src *Int4) Value() (driver.Value, error) { } } -func (src *Int4) MarshalJSON() ([]byte, error) { +func (src Int4) MarshalJSON() ([]byte, error) { switch src.Status { case Present: return []byte(strconv.FormatInt(int64(src.Int), 10)), nil diff --git a/int4_array.go b/int4_array.go index bd0babb9..83ee4c26 100644 --- a/int4_array.go +++ b/int4_array.go @@ -215,7 +215,7 @@ func (dst *Int4Array) DecodeBinary(ci *ConnInfo, src []byte) error { return nil } -func (src *Int4Array) EncodeText(ci *ConnInfo, buf []byte) ([]byte, error) { +func (src Int4Array) EncodeText(ci *ConnInfo, buf []byte) ([]byte, error) { switch src.Status { case Null: return nil, nil @@ -272,7 +272,7 @@ func (src *Int4Array) EncodeText(ci *ConnInfo, buf []byte) ([]byte, error) { return buf, nil } -func (src *Int4Array) EncodeBinary(ci *ConnInfo, buf []byte) ([]byte, error) { +func (src Int4Array) EncodeBinary(ci *ConnInfo, buf []byte) ([]byte, error) { switch src.Status { case Null: return nil, nil @@ -335,7 +335,7 @@ func (dst *Int4Array) Scan(src interface{}) error { } // Value implements the database/sql/driver Valuer interface. -func (src *Int4Array) Value() (driver.Value, error) { +func (src Int4Array) Value() (driver.Value, error) { buf, err := src.EncodeText(nil, nil) if err != nil { return nil, err diff --git a/int8.go b/int8.go index 153f1f7d..7f410b15 100644 --- a/int8.go +++ b/int8.go @@ -117,7 +117,7 @@ func (dst *Int8) DecodeBinary(ci *ConnInfo, src []byte) error { return nil } -func (src *Int8) EncodeText(ci *ConnInfo, buf []byte) ([]byte, error) { +func (src Int8) EncodeText(ci *ConnInfo, buf []byte) ([]byte, error) { switch src.Status { case Null: return nil, nil @@ -128,7 +128,7 @@ func (src *Int8) EncodeText(ci *ConnInfo, buf []byte) ([]byte, error) { return append(buf, strconv.FormatInt(src.Int, 10)...), nil } -func (src *Int8) EncodeBinary(ci *ConnInfo, buf []byte) ([]byte, error) { +func (src Int8) EncodeBinary(ci *ConnInfo, buf []byte) ([]byte, error) { switch src.Status { case Null: return nil, nil @@ -162,7 +162,7 @@ func (dst *Int8) Scan(src interface{}) error { } // Value implements the database/sql/driver Valuer interface. -func (src *Int8) Value() (driver.Value, error) { +func (src Int8) Value() (driver.Value, error) { switch src.Status { case Present: return int64(src.Int), nil @@ -173,7 +173,7 @@ func (src *Int8) Value() (driver.Value, error) { } } -func (src *Int8) MarshalJSON() ([]byte, error) { +func (src Int8) MarshalJSON() ([]byte, error) { switch src.Status { case Present: return []byte(strconv.FormatInt(src.Int, 10)), nil diff --git a/int8_array.go b/int8_array.go index 392fd47e..f118bc83 100644 --- a/int8_array.go +++ b/int8_array.go @@ -196,7 +196,7 @@ func (dst *Int8Array) DecodeBinary(ci *ConnInfo, src []byte) error { return nil } -func (src *Int8Array) EncodeText(ci *ConnInfo, buf []byte) ([]byte, error) { +func (src Int8Array) EncodeText(ci *ConnInfo, buf []byte) ([]byte, error) { switch src.Status { case Null: return nil, nil @@ -253,7 +253,7 @@ func (src *Int8Array) EncodeText(ci *ConnInfo, buf []byte) ([]byte, error) { return buf, nil } -func (src *Int8Array) EncodeBinary(ci *ConnInfo, buf []byte) ([]byte, error) { +func (src Int8Array) EncodeBinary(ci *ConnInfo, buf []byte) ([]byte, error) { switch src.Status { case Null: return nil, nil @@ -316,7 +316,7 @@ func (dst *Int8Array) Scan(src interface{}) error { } // Value implements the database/sql/driver Valuer interface. -func (src *Int8Array) Value() (driver.Value, error) { +func (src Int8Array) Value() (driver.Value, error) { buf, err := src.EncodeText(nil, nil) if err != nil { return nil, err diff --git a/interval.go b/interval.go index a7edca83..bb19f956 100644 --- a/interval.go +++ b/interval.go @@ -179,7 +179,7 @@ func (dst *Interval) DecodeBinary(ci *ConnInfo, src []byte) error { return nil } -func (src *Interval) EncodeText(ci *ConnInfo, buf []byte) ([]byte, error) { +func (src Interval) EncodeText(ci *ConnInfo, buf []byte) ([]byte, error) { switch src.Status { case Null: return nil, nil @@ -213,7 +213,7 @@ func (src *Interval) EncodeText(ci *ConnInfo, buf []byte) ([]byte, error) { } // EncodeBinary encodes src into w. -func (src *Interval) EncodeBinary(ci *ConnInfo, buf []byte) ([]byte, error) { +func (src Interval) EncodeBinary(ci *ConnInfo, buf []byte) ([]byte, error) { switch src.Status { case Null: return nil, nil @@ -246,6 +246,6 @@ func (dst *Interval) Scan(src interface{}) error { } // Value implements the database/sql/driver Valuer interface. -func (src *Interval) Value() (driver.Value, error) { +func (src Interval) Value() (driver.Value, error) { return EncodeValueText(src) } diff --git a/json.go b/json.go index 49ff7a6c..592dfa31 100644 --- a/json.go +++ b/json.go @@ -120,7 +120,7 @@ func (dst *JSON) DecodeBinary(ci *ConnInfo, src []byte) error { return dst.DecodeText(ci, src) } -func (src *JSON) EncodeText(ci *ConnInfo, buf []byte) ([]byte, error) { +func (src JSON) EncodeText(ci *ConnInfo, buf []byte) ([]byte, error) { switch src.Status { case Null: return nil, nil @@ -131,7 +131,7 @@ func (src *JSON) EncodeText(ci *ConnInfo, buf []byte) ([]byte, error) { return append(buf, src.Bytes...), nil } -func (src *JSON) EncodeBinary(ci *ConnInfo, buf []byte) ([]byte, error) { +func (src JSON) EncodeBinary(ci *ConnInfo, buf []byte) ([]byte, error) { return src.EncodeText(ci, buf) } @@ -155,7 +155,7 @@ func (dst *JSON) Scan(src interface{}) error { } // Value implements the database/sql/driver Valuer interface. -func (src *JSON) Value() (driver.Value, error) { +func (src JSON) Value() (driver.Value, error) { switch src.Status { case Present: return src.Bytes, nil diff --git a/jsonb.go b/jsonb.go index 065e4e21..c70be144 100644 --- a/jsonb.go +++ b/jsonb.go @@ -43,11 +43,11 @@ func (dst *JSONB) DecodeBinary(ci *ConnInfo, src []byte) error { } -func (src *JSONB) EncodeText(ci *ConnInfo, buf []byte) ([]byte, error) { - return (*JSON)(src).EncodeText(ci, buf) +func (src JSONB) EncodeText(ci *ConnInfo, buf []byte) ([]byte, error) { + return (JSON)(src).EncodeText(ci, buf) } -func (src *JSONB) EncodeBinary(ci *ConnInfo, buf []byte) ([]byte, error) { +func (src JSONB) EncodeBinary(ci *ConnInfo, buf []byte) ([]byte, error) { switch src.Status { case Null: return nil, nil @@ -65,6 +65,6 @@ func (dst *JSONB) Scan(src interface{}) error { } // Value implements the database/sql/driver Valuer interface. -func (src *JSONB) Value() (driver.Value, error) { - return (*JSON)(src).Value() +func (src JSONB) Value() (driver.Value, error) { + return (JSON)(src).Value() } diff --git a/line.go b/line.go index 617ee456..61477ad9 100644 --- a/line.go +++ b/line.go @@ -93,7 +93,7 @@ func (dst *Line) DecodeBinary(ci *ConnInfo, src []byte) error { return nil } -func (src *Line) EncodeText(ci *ConnInfo, buf []byte) ([]byte, error) { +func (src Line) EncodeText(ci *ConnInfo, buf []byte) ([]byte, error) { switch src.Status { case Null: return nil, nil @@ -110,7 +110,7 @@ func (src *Line) EncodeText(ci *ConnInfo, buf []byte) ([]byte, error) { return buf, nil } -func (src *Line) EncodeBinary(ci *ConnInfo, buf []byte) ([]byte, error) { +func (src Line) EncodeBinary(ci *ConnInfo, buf []byte) ([]byte, error) { switch src.Status { case Null: return nil, nil @@ -144,6 +144,6 @@ func (dst *Line) Scan(src interface{}) error { } // Value implements the database/sql/driver Valuer interface. -func (src *Line) Value() (driver.Value, error) { +func (src Line) Value() (driver.Value, error) { return EncodeValueText(src) } diff --git a/lseg.go b/lseg.go index b8d6e322..822b7bf4 100644 --- a/lseg.go +++ b/lseg.go @@ -108,7 +108,7 @@ func (dst *Lseg) DecodeBinary(ci *ConnInfo, src []byte) error { return nil } -func (src *Lseg) EncodeText(ci *ConnInfo, buf []byte) ([]byte, error) { +func (src Lseg) EncodeText(ci *ConnInfo, buf []byte) ([]byte, error) { switch src.Status { case Null: return nil, nil @@ -126,7 +126,7 @@ func (src *Lseg) EncodeText(ci *ConnInfo, buf []byte) ([]byte, error) { return buf, nil } -func (src *Lseg) EncodeBinary(ci *ConnInfo, buf []byte) ([]byte, error) { +func (src Lseg) EncodeBinary(ci *ConnInfo, buf []byte) ([]byte, error) { switch src.Status { case Null: return nil, nil @@ -161,6 +161,6 @@ func (dst *Lseg) Scan(src interface{}) error { } // Value implements the database/sql/driver Valuer interface. -func (src *Lseg) Value() (driver.Value, error) { +func (src Lseg) Value() (driver.Value, error) { return EncodeValueText(src) } diff --git a/macaddr.go b/macaddr.go index 25ffc48e..29c60440 100644 --- a/macaddr.go +++ b/macaddr.go @@ -107,7 +107,7 @@ func (dst *Macaddr) DecodeBinary(ci *ConnInfo, src []byte) error { return nil } -func (src *Macaddr) EncodeText(ci *ConnInfo, buf []byte) ([]byte, error) { +func (src Macaddr) EncodeText(ci *ConnInfo, buf []byte) ([]byte, error) { switch src.Status { case Null: return nil, nil @@ -119,7 +119,7 @@ func (src *Macaddr) EncodeText(ci *ConnInfo, buf []byte) ([]byte, error) { } // EncodeBinary encodes src into w. -func (src *Macaddr) EncodeBinary(ci *ConnInfo, buf []byte) ([]byte, error) { +func (src Macaddr) EncodeBinary(ci *ConnInfo, buf []byte) ([]byte, error) { switch src.Status { case Null: return nil, nil @@ -150,6 +150,6 @@ func (dst *Macaddr) Scan(src interface{}) error { } // Value implements the database/sql/driver Valuer interface. -func (src *Macaddr) Value() (driver.Value, error) { +func (src Macaddr) Value() (driver.Value, error) { return EncodeValueText(src) } diff --git a/macaddr_array.go b/macaddr_array.go index 0b791104..7c62da2b 100644 --- a/macaddr_array.go +++ b/macaddr_array.go @@ -169,7 +169,7 @@ func (dst *MacaddrArray) DecodeBinary(ci *ConnInfo, src []byte) error { return nil } -func (src *MacaddrArray) EncodeText(ci *ConnInfo, buf []byte) ([]byte, error) { +func (src MacaddrArray) EncodeText(ci *ConnInfo, buf []byte) ([]byte, error) { switch src.Status { case Null: return nil, nil @@ -226,7 +226,7 @@ func (src *MacaddrArray) EncodeText(ci *ConnInfo, buf []byte) ([]byte, error) { return buf, nil } -func (src *MacaddrArray) EncodeBinary(ci *ConnInfo, buf []byte) ([]byte, error) { +func (src MacaddrArray) EncodeBinary(ci *ConnInfo, buf []byte) ([]byte, error) { switch src.Status { case Null: return nil, nil @@ -289,7 +289,7 @@ func (dst *MacaddrArray) Scan(src interface{}) error { } // Value implements the database/sql/driver Valuer interface. -func (src *MacaddrArray) Value() (driver.Value, error) { +func (src MacaddrArray) Value() (driver.Value, error) { buf, err := src.EncodeText(nil, nil) if err != nil { return nil, err diff --git a/name.go b/name.go index af064a82..753a074a 100644 --- a/name.go +++ b/name.go @@ -39,12 +39,12 @@ func (dst *Name) DecodeBinary(ci *ConnInfo, src []byte) error { return (*Text)(dst).DecodeBinary(ci, src) } -func (src *Name) EncodeText(ci *ConnInfo, buf []byte) ([]byte, error) { - return (*Text)(src).EncodeText(ci, buf) +func (src Name) EncodeText(ci *ConnInfo, buf []byte) ([]byte, error) { + return (Text)(src).EncodeText(ci, buf) } -func (src *Name) EncodeBinary(ci *ConnInfo, buf []byte) ([]byte, error) { - return (*Text)(src).EncodeBinary(ci, buf) +func (src Name) EncodeBinary(ci *ConnInfo, buf []byte) ([]byte, error) { + return (Text)(src).EncodeBinary(ci, buf) } // Scan implements the database/sql Scanner interface. @@ -53,6 +53,6 @@ func (dst *Name) Scan(src interface{}) error { } // Value implements the database/sql/driver Valuer interface. -func (src *Name) Value() (driver.Value, error) { - return (*Text)(src).Value() +func (src Name) Value() (driver.Value, error) { + return (Text)(src).Value() } diff --git a/numeric.go b/numeric.go index 45854e70..554fb582 100644 --- a/numeric.go +++ b/numeric.go @@ -455,7 +455,7 @@ func nbaseDigitsToInt64(src []byte) (accum int64, bytesRead, digitsRead int) { return accum, rp, digits } -func (src *Numeric) EncodeText(ci *ConnInfo, buf []byte) ([]byte, error) { +func (src Numeric) EncodeText(ci *ConnInfo, buf []byte) ([]byte, error) { switch src.Status { case Null: return nil, nil @@ -469,7 +469,7 @@ func (src *Numeric) EncodeText(ci *ConnInfo, buf []byte) ([]byte, error) { return buf, nil } -func (src *Numeric) EncodeBinary(ci *ConnInfo, buf []byte) ([]byte, error) { +func (src Numeric) EncodeBinary(ci *ConnInfo, buf []byte) ([]byte, error) { switch src.Status { case Null: return nil, nil @@ -580,7 +580,7 @@ func (dst *Numeric) Scan(src interface{}) error { } // Value implements the database/sql/driver Valuer interface. -func (src *Numeric) Value() (driver.Value, error) { +func (src Numeric) Value() (driver.Value, error) { switch src.Status { case Present: buf, err := src.EncodeText(nil, nil) diff --git a/numeric_array.go b/numeric_array.go index 1e8c5cda..8757b14d 100644 --- a/numeric_array.go +++ b/numeric_array.go @@ -252,7 +252,7 @@ func (dst *NumericArray) DecodeBinary(ci *ConnInfo, src []byte) error { return nil } -func (src *NumericArray) EncodeText(ci *ConnInfo, buf []byte) ([]byte, error) { +func (src NumericArray) EncodeText(ci *ConnInfo, buf []byte) ([]byte, error) { switch src.Status { case Null: return nil, nil @@ -309,7 +309,7 @@ func (src *NumericArray) EncodeText(ci *ConnInfo, buf []byte) ([]byte, error) { return buf, nil } -func (src *NumericArray) EncodeBinary(ci *ConnInfo, buf []byte) ([]byte, error) { +func (src NumericArray) EncodeBinary(ci *ConnInfo, buf []byte) ([]byte, error) { switch src.Status { case Null: return nil, nil @@ -372,7 +372,7 @@ func (dst *NumericArray) Scan(src interface{}) error { } // Value implements the database/sql/driver Valuer interface. -func (src *NumericArray) Value() (driver.Value, error) { +func (src NumericArray) Value() (driver.Value, error) { buf, err := src.EncodeText(nil, nil) if err != nil { return nil, err diff --git a/oid_value.go b/oid_value.go index 7eae4bf1..619681a5 100644 --- a/oid_value.go +++ b/oid_value.go @@ -36,12 +36,12 @@ func (dst *OIDValue) DecodeBinary(ci *ConnInfo, src []byte) error { return (*pguint32)(dst).DecodeBinary(ci, src) } -func (src *OIDValue) EncodeText(ci *ConnInfo, buf []byte) ([]byte, error) { - return (*pguint32)(src).EncodeText(ci, buf) +func (src OIDValue) EncodeText(ci *ConnInfo, buf []byte) ([]byte, error) { + return (pguint32)(src).EncodeText(ci, buf) } -func (src *OIDValue) EncodeBinary(ci *ConnInfo, buf []byte) ([]byte, error) { - return (*pguint32)(src).EncodeBinary(ci, buf) +func (src OIDValue) EncodeBinary(ci *ConnInfo, buf []byte) ([]byte, error) { + return (pguint32)(src).EncodeBinary(ci, buf) } // Scan implements the database/sql Scanner interface. @@ -50,6 +50,6 @@ func (dst *OIDValue) Scan(src interface{}) error { } // Value implements the database/sql/driver Valuer interface. -func (src *OIDValue) Value() (driver.Value, error) { - return (*pguint32)(src).Value() +func (src OIDValue) Value() (driver.Value, error) { + return (pguint32)(src).Value() } diff --git a/path.go b/path.go index a4c6af77..484c9174 100644 --- a/path.go +++ b/path.go @@ -116,7 +116,7 @@ func (dst *Path) DecodeBinary(ci *ConnInfo, src []byte) error { return nil } -func (src *Path) EncodeText(ci *ConnInfo, buf []byte) ([]byte, error) { +func (src Path) EncodeText(ci *ConnInfo, buf []byte) ([]byte, error) { switch src.Status { case Null: return nil, nil @@ -147,7 +147,7 @@ func (src *Path) EncodeText(ci *ConnInfo, buf []byte) ([]byte, error) { return append(buf, endByte), nil } -func (src *Path) EncodeBinary(ci *ConnInfo, buf []byte) ([]byte, error) { +func (src Path) EncodeBinary(ci *ConnInfo, buf []byte) ([]byte, error) { switch src.Status { case Null: return nil, nil @@ -191,6 +191,6 @@ func (dst *Path) Scan(src interface{}) error { } // Value implements the database/sql/driver Valuer interface. -func (src *Path) Value() (driver.Value, error) { +func (src Path) Value() (driver.Value, error) { return EncodeValueText(src) } diff --git a/pguint32.go b/pguint32.go index 21da9664..546d6f8f 100644 --- a/pguint32.go +++ b/pguint32.go @@ -102,7 +102,7 @@ func (dst *pguint32) DecodeBinary(ci *ConnInfo, src []byte) error { return nil } -func (src *pguint32) EncodeText(ci *ConnInfo, buf []byte) ([]byte, error) { +func (src pguint32) EncodeText(ci *ConnInfo, buf []byte) ([]byte, error) { switch src.Status { case Null: return nil, nil @@ -113,7 +113,7 @@ func (src *pguint32) EncodeText(ci *ConnInfo, buf []byte) ([]byte, error) { return append(buf, strconv.FormatUint(uint64(src.Uint), 10)...), nil } -func (src *pguint32) EncodeBinary(ci *ConnInfo, buf []byte) ([]byte, error) { +func (src pguint32) EncodeBinary(ci *ConnInfo, buf []byte) ([]byte, error) { switch src.Status { case Null: return nil, nil @@ -150,7 +150,7 @@ func (dst *pguint32) Scan(src interface{}) error { } // Value implements the database/sql/driver Valuer interface. -func (src *pguint32) Value() (driver.Value, error) { +func (src pguint32) Value() (driver.Value, error) { switch src.Status { case Present: return int64(src.Uint), nil diff --git a/point.go b/point.go index 89f2359b..bb7daa24 100644 --- a/point.go +++ b/point.go @@ -90,7 +90,7 @@ func (dst *Point) DecodeBinary(ci *ConnInfo, src []byte) error { return nil } -func (src *Point) EncodeText(ci *ConnInfo, buf []byte) ([]byte, error) { +func (src Point) EncodeText(ci *ConnInfo, buf []byte) ([]byte, error) { switch src.Status { case Null: return nil, nil @@ -104,7 +104,7 @@ func (src *Point) EncodeText(ci *ConnInfo, buf []byte) ([]byte, error) { )...), nil } -func (src *Point) EncodeBinary(ci *ConnInfo, buf []byte) ([]byte, error) { +func (src Point) EncodeBinary(ci *ConnInfo, buf []byte) ([]byte, error) { switch src.Status { case Null: return nil, nil @@ -137,6 +137,6 @@ func (dst *Point) Scan(src interface{}) error { } // Value implements the database/sql/driver Valuer interface. -func (src *Point) Value() (driver.Value, error) { +func (src Point) Value() (driver.Value, error) { return EncodeValueText(src) } diff --git a/polygon.go b/polygon.go index e739c71b..7805604b 100644 --- a/polygon.go +++ b/polygon.go @@ -111,7 +111,7 @@ func (dst *Polygon) DecodeBinary(ci *ConnInfo, src []byte) error { return nil } -func (src *Polygon) EncodeText(ci *ConnInfo, buf []byte) ([]byte, error) { +func (src Polygon) EncodeText(ci *ConnInfo, buf []byte) ([]byte, error) { switch src.Status { case Null: return nil, nil @@ -134,7 +134,7 @@ func (src *Polygon) EncodeText(ci *ConnInfo, buf []byte) ([]byte, error) { return append(buf, ')'), nil } -func (src *Polygon) EncodeBinary(ci *ConnInfo, buf []byte) ([]byte, error) { +func (src Polygon) EncodeBinary(ci *ConnInfo, buf []byte) ([]byte, error) { switch src.Status { case Null: return nil, nil @@ -172,6 +172,6 @@ func (dst *Polygon) Scan(src interface{}) error { } // Value implements the database/sql/driver Valuer interface. -func (src *Polygon) Value() (driver.Value, error) { +func (src Polygon) Value() (driver.Value, error) { return EncodeValueText(src) } diff --git a/qchar.go b/qchar.go index 5e77dc38..8a316d9b 100644 --- a/qchar.go +++ b/qchar.go @@ -134,7 +134,7 @@ func (dst *QChar) DecodeBinary(ci *ConnInfo, src []byte) error { return nil } -func (src *QChar) EncodeBinary(ci *ConnInfo, buf []byte) ([]byte, error) { +func (src QChar) EncodeBinary(ci *ConnInfo, buf []byte) ([]byte, error) { switch src.Status { case Null: return nil, nil diff --git a/text.go b/text.go index 4d4e6bb4..d13a9ba4 100644 --- a/text.go +++ b/text.go @@ -92,7 +92,7 @@ func (dst *Text) DecodeBinary(ci *ConnInfo, src []byte) error { return dst.DecodeText(ci, src) } -func (src *Text) EncodeText(ci *ConnInfo, buf []byte) ([]byte, error) { +func (src Text) EncodeText(ci *ConnInfo, buf []byte) ([]byte, error) { switch src.Status { case Null: return nil, nil @@ -103,7 +103,7 @@ func (src *Text) EncodeText(ci *ConnInfo, buf []byte) ([]byte, error) { return append(buf, src.String...), nil } -func (src *Text) EncodeBinary(ci *ConnInfo, buf []byte) ([]byte, error) { +func (src Text) EncodeBinary(ci *ConnInfo, buf []byte) ([]byte, error) { return src.EncodeText(ci, buf) } @@ -127,7 +127,7 @@ func (dst *Text) Scan(src interface{}) error { } // Value implements the database/sql/driver Valuer interface. -func (src *Text) Value() (driver.Value, error) { +func (src Text) Value() (driver.Value, error) { switch src.Status { case Present: return src.String, nil @@ -138,7 +138,7 @@ func (src *Text) Value() (driver.Value, error) { } } -func (src *Text) MarshalJSON() ([]byte, error) { +func (src Text) MarshalJSON() ([]byte, error) { switch src.Status { case Present: return json.Marshal(src.String) diff --git a/text_array.go b/text_array.go index b590972e..fca36ec8 100644 --- a/text_array.go +++ b/text_array.go @@ -168,7 +168,7 @@ func (dst *TextArray) DecodeBinary(ci *ConnInfo, src []byte) error { return nil } -func (src *TextArray) EncodeText(ci *ConnInfo, buf []byte) ([]byte, error) { +func (src TextArray) EncodeText(ci *ConnInfo, buf []byte) ([]byte, error) { switch src.Status { case Null: return nil, nil @@ -225,7 +225,7 @@ func (src *TextArray) EncodeText(ci *ConnInfo, buf []byte) ([]byte, error) { return buf, nil } -func (src *TextArray) EncodeBinary(ci *ConnInfo, buf []byte) ([]byte, error) { +func (src TextArray) EncodeBinary(ci *ConnInfo, buf []byte) ([]byte, error) { switch src.Status { case Null: return nil, nil @@ -288,7 +288,7 @@ func (dst *TextArray) Scan(src interface{}) error { } // Value implements the database/sql/driver Valuer interface. -func (src *TextArray) Value() (driver.Value, error) { +func (src TextArray) Value() (driver.Value, error) { buf, err := src.EncodeText(nil, nil) if err != nil { return nil, err diff --git a/tid.go b/tid.go index ff788b84..08f5c047 100644 --- a/tid.go +++ b/tid.go @@ -94,7 +94,7 @@ func (dst *TID) DecodeBinary(ci *ConnInfo, src []byte) error { return nil } -func (src *TID) EncodeText(ci *ConnInfo, buf []byte) ([]byte, error) { +func (src TID) EncodeText(ci *ConnInfo, buf []byte) ([]byte, error) { switch src.Status { case Null: return nil, nil @@ -106,7 +106,7 @@ func (src *TID) EncodeText(ci *ConnInfo, buf []byte) ([]byte, error) { return buf, nil } -func (src *TID) EncodeBinary(ci *ConnInfo, buf []byte) ([]byte, error) { +func (src TID) EncodeBinary(ci *ConnInfo, buf []byte) ([]byte, error) { switch src.Status { case Null: return nil, nil @@ -139,6 +139,6 @@ func (dst *TID) Scan(src interface{}) error { } // Value implements the database/sql/driver Valuer interface. -func (src *TID) Value() (driver.Value, error) { +func (src TID) Value() (driver.Value, error) { return EncodeValueText(src) } diff --git a/timestamp.go b/timestamp.go index 40dfdac8..01c38a0a 100644 --- a/timestamp.go +++ b/timestamp.go @@ -136,7 +136,7 @@ func (dst *Timestamp) DecodeBinary(ci *ConnInfo, src []byte) error { // EncodeText writes the text encoding of src into w. If src.Time is not in // the UTC time zone it returns an error. -func (src *Timestamp) EncodeText(ci *ConnInfo, buf []byte) ([]byte, error) { +func (src Timestamp) EncodeText(ci *ConnInfo, buf []byte) ([]byte, error) { switch src.Status { case Null: return nil, nil @@ -163,7 +163,7 @@ func (src *Timestamp) EncodeText(ci *ConnInfo, buf []byte) ([]byte, error) { // EncodeBinary writes the binary encoding of src into w. If src.Time is not in // the UTC time zone it returns an error. -func (src *Timestamp) EncodeBinary(ci *ConnInfo, buf []byte) ([]byte, error) { +func (src Timestamp) EncodeBinary(ci *ConnInfo, buf []byte) ([]byte, error) { switch src.Status { case Null: return nil, nil @@ -211,7 +211,7 @@ func (dst *Timestamp) Scan(src interface{}) error { } // Value implements the database/sql/driver Valuer interface. -func (src *Timestamp) Value() (driver.Value, error) { +func (src Timestamp) Value() (driver.Value, error) { switch src.Status { case Present: if src.InfinityModifier != None { diff --git a/timestamp_array.go b/timestamp_array.go index 95f76639..204b22eb 100644 --- a/timestamp_array.go +++ b/timestamp_array.go @@ -169,7 +169,7 @@ func (dst *TimestampArray) DecodeBinary(ci *ConnInfo, src []byte) error { return nil } -func (src *TimestampArray) EncodeText(ci *ConnInfo, buf []byte) ([]byte, error) { +func (src TimestampArray) EncodeText(ci *ConnInfo, buf []byte) ([]byte, error) { switch src.Status { case Null: return nil, nil @@ -226,7 +226,7 @@ func (src *TimestampArray) EncodeText(ci *ConnInfo, buf []byte) ([]byte, error) return buf, nil } -func (src *TimestampArray) EncodeBinary(ci *ConnInfo, buf []byte) ([]byte, error) { +func (src TimestampArray) EncodeBinary(ci *ConnInfo, buf []byte) ([]byte, error) { switch src.Status { case Null: return nil, nil @@ -289,7 +289,7 @@ func (dst *TimestampArray) Scan(src interface{}) error { } // Value implements the database/sql/driver Valuer interface. -func (src *TimestampArray) Value() (driver.Value, error) { +func (src TimestampArray) Value() (driver.Value, error) { buf, err := src.EncodeText(nil, nil) if err != nil { return nil, err diff --git a/timestamptz.go b/timestamptz.go index 752c1818..9af39b16 100644 --- a/timestamptz.go +++ b/timestamptz.go @@ -140,7 +140,7 @@ func (dst *Timestamptz) DecodeBinary(ci *ConnInfo, src []byte) error { return nil } -func (src *Timestamptz) EncodeText(ci *ConnInfo, buf []byte) ([]byte, error) { +func (src Timestamptz) EncodeText(ci *ConnInfo, buf []byte) ([]byte, error) { switch src.Status { case Null: return nil, nil @@ -162,7 +162,7 @@ func (src *Timestamptz) EncodeText(ci *ConnInfo, buf []byte) ([]byte, error) { return append(buf, s...), nil } -func (src *Timestamptz) EncodeBinary(ci *ConnInfo, buf []byte) ([]byte, error) { +func (src Timestamptz) EncodeBinary(ci *ConnInfo, buf []byte) ([]byte, error) { switch src.Status { case Null: return nil, nil @@ -207,7 +207,7 @@ func (dst *Timestamptz) Scan(src interface{}) error { } // Value implements the database/sql/driver Valuer interface. -func (src *Timestamptz) Value() (driver.Value, error) { +func (src Timestamptz) Value() (driver.Value, error) { switch src.Status { case Present: if src.InfinityModifier != None { diff --git a/timestamptz_array.go b/timestamptz_array.go index 7fe60d50..9bef64c6 100644 --- a/timestamptz_array.go +++ b/timestamptz_array.go @@ -169,7 +169,7 @@ func (dst *TimestamptzArray) DecodeBinary(ci *ConnInfo, src []byte) error { return nil } -func (src *TimestamptzArray) EncodeText(ci *ConnInfo, buf []byte) ([]byte, error) { +func (src TimestamptzArray) EncodeText(ci *ConnInfo, buf []byte) ([]byte, error) { switch src.Status { case Null: return nil, nil @@ -226,7 +226,7 @@ func (src *TimestamptzArray) EncodeText(ci *ConnInfo, buf []byte) ([]byte, error return buf, nil } -func (src *TimestamptzArray) EncodeBinary(ci *ConnInfo, buf []byte) ([]byte, error) { +func (src TimestamptzArray) EncodeBinary(ci *ConnInfo, buf []byte) ([]byte, error) { switch src.Status { case Null: return nil, nil @@ -289,7 +289,7 @@ func (dst *TimestamptzArray) Scan(src interface{}) error { } // Value implements the database/sql/driver Valuer interface. -func (src *TimestamptzArray) Value() (driver.Value, error) { +func (src TimestamptzArray) Value() (driver.Value, error) { buf, err := src.EncodeText(nil, nil) if err != nil { return nil, err diff --git a/unknown.go b/unknown.go index 567831d7..2dca0f87 100644 --- a/unknown.go +++ b/unknown.go @@ -39,6 +39,6 @@ func (dst *Unknown) Scan(src interface{}) error { } // Value implements the database/sql/driver Valuer interface. -func (src *Unknown) Value() (driver.Value, error) { - return (*Text)(src).Value() +func (src Unknown) Value() (driver.Value, error) { + return (Text)(src).Value() } diff --git a/uuid.go b/uuid.go index 5dd10d89..ba999a06 100644 --- a/uuid.go +++ b/uuid.go @@ -139,7 +139,7 @@ func (dst *UUID) DecodeBinary(ci *ConnInfo, src []byte) error { return nil } -func (src *UUID) EncodeText(ci *ConnInfo, buf []byte) ([]byte, error) { +func (src UUID) EncodeText(ci *ConnInfo, buf []byte) ([]byte, error) { switch src.Status { case Null: return nil, nil @@ -150,7 +150,7 @@ func (src *UUID) EncodeText(ci *ConnInfo, buf []byte) ([]byte, error) { return append(buf, encodeUUID(src.Bytes)...), nil } -func (src *UUID) EncodeBinary(ci *ConnInfo, buf []byte) ([]byte, error) { +func (src UUID) EncodeBinary(ci *ConnInfo, buf []byte) ([]byte, error) { switch src.Status { case Null: return nil, nil @@ -181,6 +181,6 @@ func (dst *UUID) Scan(src interface{}) error { } // Value implements the database/sql/driver Valuer interface. -func (src *UUID) Value() (driver.Value, error) { +func (src UUID) Value() (driver.Value, error) { return EncodeValueText(src) } diff --git a/uuid_array.go b/uuid_array.go index 1d28ee59..c3f18882 100644 --- a/uuid_array.go +++ b/uuid_array.go @@ -224,7 +224,7 @@ func (dst *UUIDArray) DecodeBinary(ci *ConnInfo, src []byte) error { return nil } -func (src *UUIDArray) EncodeText(ci *ConnInfo, buf []byte) ([]byte, error) { +func (src UUIDArray) EncodeText(ci *ConnInfo, buf []byte) ([]byte, error) { switch src.Status { case Null: return nil, nil @@ -281,7 +281,7 @@ func (src *UUIDArray) EncodeText(ci *ConnInfo, buf []byte) ([]byte, error) { return buf, nil } -func (src *UUIDArray) EncodeBinary(ci *ConnInfo, buf []byte) ([]byte, error) { +func (src UUIDArray) EncodeBinary(ci *ConnInfo, buf []byte) ([]byte, error) { switch src.Status { case Null: return nil, nil @@ -344,7 +344,7 @@ func (dst *UUIDArray) Scan(src interface{}) error { } // Value implements the database/sql/driver Valuer interface. -func (src *UUIDArray) Value() (driver.Value, error) { +func (src UUIDArray) Value() (driver.Value, error) { buf, err := src.EncodeText(nil, nil) if err != nil { return nil, err diff --git a/varbit.go b/varbit.go index fe4db33d..019fff8a 100644 --- a/varbit.go +++ b/varbit.go @@ -75,7 +75,7 @@ func (dst *Varbit) DecodeBinary(ci *ConnInfo, src []byte) error { return nil } -func (src *Varbit) EncodeText(ci *ConnInfo, buf []byte) ([]byte, error) { +func (src Varbit) EncodeText(ci *ConnInfo, buf []byte) ([]byte, error) { switch src.Status { case Null: return nil, nil @@ -96,7 +96,7 @@ func (src *Varbit) EncodeText(ci *ConnInfo, buf []byte) ([]byte, error) { return buf, nil } -func (src *Varbit) EncodeBinary(ci *ConnInfo, buf []byte) ([]byte, error) { +func (src Varbit) EncodeBinary(ci *ConnInfo, buf []byte) ([]byte, error) { switch src.Status { case Null: return nil, nil @@ -128,6 +128,6 @@ func (dst *Varbit) Scan(src interface{}) error { } // Value implements the database/sql/driver Valuer interface. -func (src *Varbit) Value() (driver.Value, error) { +func (src Varbit) Value() (driver.Value, error) { return EncodeValueText(src) } diff --git a/varchar.go b/varchar.go index 6be1a035..58de1097 100644 --- a/varchar.go +++ b/varchar.go @@ -31,12 +31,12 @@ func (dst *Varchar) DecodeBinary(ci *ConnInfo, src []byte) error { return (*Text)(dst).DecodeBinary(ci, src) } -func (src *Varchar) EncodeText(ci *ConnInfo, buf []byte) ([]byte, error) { - return (*Text)(src).EncodeText(ci, buf) +func (src Varchar) EncodeText(ci *ConnInfo, buf []byte) ([]byte, error) { + return (Text)(src).EncodeText(ci, buf) } -func (src *Varchar) EncodeBinary(ci *ConnInfo, buf []byte) ([]byte, error) { - return (*Text)(src).EncodeBinary(ci, buf) +func (src Varchar) EncodeBinary(ci *ConnInfo, buf []byte) ([]byte, error) { + return (Text)(src).EncodeBinary(ci, buf) } // Scan implements the database/sql Scanner interface. @@ -45,12 +45,12 @@ func (dst *Varchar) Scan(src interface{}) error { } // Value implements the database/sql/driver Valuer interface. -func (src *Varchar) Value() (driver.Value, error) { - return (*Text)(src).Value() +func (src Varchar) Value() (driver.Value, error) { + return (Text)(src).Value() } -func (src *Varchar) MarshalJSON() ([]byte, error) { - return (*Text)(src).MarshalJSON() +func (src Varchar) MarshalJSON() ([]byte, error) { + return (Text)(src).MarshalJSON() } func (dst *Varchar) UnmarshalJSON(b []byte) error { diff --git a/varchar_array.go b/varchar_array.go index 6aa92337..1e60c344 100644 --- a/varchar_array.go +++ b/varchar_array.go @@ -168,7 +168,7 @@ func (dst *VarcharArray) DecodeBinary(ci *ConnInfo, src []byte) error { return nil } -func (src *VarcharArray) EncodeText(ci *ConnInfo, buf []byte) ([]byte, error) { +func (src VarcharArray) EncodeText(ci *ConnInfo, buf []byte) ([]byte, error) { switch src.Status { case Null: return nil, nil @@ -225,7 +225,7 @@ func (src *VarcharArray) EncodeText(ci *ConnInfo, buf []byte) ([]byte, error) { return buf, nil } -func (src *VarcharArray) EncodeBinary(ci *ConnInfo, buf []byte) ([]byte, error) { +func (src VarcharArray) EncodeBinary(ci *ConnInfo, buf []byte) ([]byte, error) { switch src.Status { case Null: return nil, nil @@ -288,7 +288,7 @@ func (dst *VarcharArray) Scan(src interface{}) error { } // Value implements the database/sql/driver Valuer interface. -func (src *VarcharArray) Value() (driver.Value, error) { +func (src VarcharArray) Value() (driver.Value, error) { buf, err := src.EncodeText(nil, nil) if err != nil { return nil, err diff --git a/xid.go b/xid.go index f66f5367..80ebf0e0 100644 --- a/xid.go +++ b/xid.go @@ -45,12 +45,12 @@ func (dst *XID) DecodeBinary(ci *ConnInfo, src []byte) error { return (*pguint32)(dst).DecodeBinary(ci, src) } -func (src *XID) EncodeText(ci *ConnInfo, buf []byte) ([]byte, error) { - return (*pguint32)(src).EncodeText(ci, buf) +func (src XID) EncodeText(ci *ConnInfo, buf []byte) ([]byte, error) { + return (pguint32)(src).EncodeText(ci, buf) } -func (src *XID) EncodeBinary(ci *ConnInfo, buf []byte) ([]byte, error) { - return (*pguint32)(src).EncodeBinary(ci, buf) +func (src XID) EncodeBinary(ci *ConnInfo, buf []byte) ([]byte, error) { + return (pguint32)(src).EncodeBinary(ci, buf) } // Scan implements the database/sql Scanner interface. @@ -59,6 +59,6 @@ func (dst *XID) Scan(src interface{}) error { } // Value implements the database/sql/driver Valuer interface. -func (src *XID) Value() (driver.Value, error) { - return (*pguint32)(src).Value() +func (src XID) Value() (driver.Value, error) { + return (pguint32)(src).Value() }