Use pointer methods for all struct pgtypes
Now no need to no whether certain interfaces are implemented by struct or pointer to struct.
This commit is contained in:
+6
-6
@@ -37,12 +37,12 @@ func (dst *OidValue) DecodeBinary(ci *ConnInfo, src []byte) error {
|
||||
return (*pguint32)(dst).DecodeBinary(ci, src)
|
||||
}
|
||||
|
||||
func (src OidValue) EncodeText(ci *ConnInfo, w io.Writer) (bool, error) {
|
||||
return (pguint32)(src).EncodeText(ci, w)
|
||||
func (src *OidValue) EncodeText(ci *ConnInfo, w io.Writer) (bool, error) {
|
||||
return (*pguint32)(src).EncodeText(ci, w)
|
||||
}
|
||||
|
||||
func (src OidValue) EncodeBinary(ci *ConnInfo, w io.Writer) (bool, error) {
|
||||
return (pguint32)(src).EncodeBinary(ci, w)
|
||||
func (src *OidValue) EncodeBinary(ci *ConnInfo, w io.Writer) (bool, error) {
|
||||
return (*pguint32)(src).EncodeBinary(ci, w)
|
||||
}
|
||||
|
||||
// Scan implements the database/sql Scanner interface.
|
||||
@@ -51,6 +51,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()
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user