2
0

Fix test and avoid change to array signatures

typed_array.go.erb was not updated back in
a8802b16cc when Value, EncodeBinary,
EncodeText, and MarshalJSON were changed to be defined on T instead of
*T. This has been corrected.
This commit is contained in:
Jack Christensen
2019-11-14 20:40:41 -06:00
parent 0079108e29
commit be36a7e14b
24 changed files with 100 additions and 79 deletions
+3 -3
View File
@@ -180,7 +180,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
@@ -237,7 +237,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
@@ -300,7 +300,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