From 6cb3439492c1c0d3ec4106d67bdd602536a01655 Mon Sep 17 00:00:00 2001 From: Jack Christensen Date: Sat, 8 Jan 2022 18:35:54 -0600 Subject: [PATCH] Fix encode plan names --- pgtype/bool.go | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/pgtype/bool.go b/pgtype/bool.go index 3dd7efd3..d81c2417 100644 --- a/pgtype/bool.go +++ b/pgtype/bool.go @@ -113,14 +113,14 @@ func (BoolCodec) PlanEncode(ci *ConnInfo, oid uint32, format int16, value interf case bool: return encodePlanBoolCodecBinaryBool{} case BoolValuer: - return encodePlanBoolCodecBinaryBoolScanner{} + return encodePlanBoolCodecBinaryBoolValuer{} } case TextFormatCode: switch value.(type) { case bool: return encodePlanBoolCodecTextBool{} case BoolValuer: - return encodePlanBoolCodecTextBoolScanner{} + return encodePlanBoolCodecTextBoolValuer{} } } @@ -141,9 +141,9 @@ func (encodePlanBoolCodecBinaryBool) Encode(value interface{}, buf []byte) (newB return buf, nil } -type encodePlanBoolCodecTextBoolScanner struct{} +type encodePlanBoolCodecTextBoolValuer struct{} -func (encodePlanBoolCodecTextBoolScanner) Encode(value interface{}, buf []byte) (newBuf []byte, err error) { +func (encodePlanBoolCodecTextBoolValuer) Encode(value interface{}, buf []byte) (newBuf []byte, err error) { b, err := value.(BoolValuer).BoolValue() if err != nil { return nil, err @@ -162,9 +162,9 @@ func (encodePlanBoolCodecTextBoolScanner) Encode(value interface{}, buf []byte) return buf, nil } -type encodePlanBoolCodecBinaryBoolScanner struct{} +type encodePlanBoolCodecBinaryBoolValuer struct{} -func (encodePlanBoolCodecBinaryBoolScanner) Encode(value interface{}, buf []byte) (newBuf []byte, err error) { +func (encodePlanBoolCodecBinaryBoolValuer) Encode(value interface{}, buf []byte) (newBuf []byte, err error) { b, err := value.(BoolValuer).BoolValue() if err != nil { return nil, err