Remove useless allocations
This commit is contained in:
+2
-2
@@ -108,9 +108,9 @@ func (BoolCodec) PreferredFormat() int16 {
|
||||
func (BoolCodec) PlanEncode(ci *ConnInfo, oid uint32, format int16, value interface{}) EncodePlan {
|
||||
switch format {
|
||||
case BinaryFormatCode:
|
||||
return &encodePlanBoolCodecBinary{}
|
||||
return encodePlanBoolCodecBinary{}
|
||||
case TextFormatCode:
|
||||
return &encodePlanBoolCodecText{}
|
||||
return encodePlanBoolCodecText{}
|
||||
}
|
||||
|
||||
return nil
|
||||
|
||||
+2
-2
@@ -78,9 +78,9 @@ func (BoxCodec) PlanEncode(ci *ConnInfo, oid uint32, format int16, value interfa
|
||||
|
||||
switch format {
|
||||
case BinaryFormatCode:
|
||||
return &encodePlanBoxCodecBinary{}
|
||||
return encodePlanBoxCodecBinary{}
|
||||
case TextFormatCode:
|
||||
return &encodePlanBoxCodecText{}
|
||||
return encodePlanBoxCodecText{}
|
||||
}
|
||||
|
||||
return nil
|
||||
|
||||
+2
-2
@@ -79,9 +79,9 @@ func (CircleCodec) PlanEncode(ci *ConnInfo, oid uint32, format int16, value inte
|
||||
|
||||
switch format {
|
||||
case BinaryFormatCode:
|
||||
return &encodePlanCircleCodecBinary{}
|
||||
return encodePlanCircleCodecBinary{}
|
||||
case TextFormatCode:
|
||||
return &encodePlanCircleCodecText{}
|
||||
return encodePlanCircleCodecText{}
|
||||
}
|
||||
|
||||
return nil
|
||||
|
||||
+6
-6
@@ -122,9 +122,9 @@ func (Int2Codec) PreferredFormat() int16 {
|
||||
func (Int2Codec) PlanEncode(ci *ConnInfo, oid uint32, format int16, value interface{}) EncodePlan {
|
||||
switch format {
|
||||
case BinaryFormatCode:
|
||||
return &encodePlanInt2CodecBinary{}
|
||||
return encodePlanInt2CodecBinary{}
|
||||
case TextFormatCode:
|
||||
return &encodePlanInt2CodecText{}
|
||||
return encodePlanInt2CodecText{}
|
||||
}
|
||||
|
||||
return nil
|
||||
@@ -629,9 +629,9 @@ func (Int4Codec) PreferredFormat() int16 {
|
||||
func (Int4Codec) PlanEncode(ci *ConnInfo, oid uint32, format int16, value interface{}) EncodePlan {
|
||||
switch format {
|
||||
case BinaryFormatCode:
|
||||
return &encodePlanInt4CodecBinary{}
|
||||
return encodePlanInt4CodecBinary{}
|
||||
case TextFormatCode:
|
||||
return &encodePlanInt4CodecText{}
|
||||
return encodePlanInt4CodecText{}
|
||||
}
|
||||
|
||||
return nil
|
||||
@@ -1147,9 +1147,9 @@ func (Int8Codec) PreferredFormat() int16 {
|
||||
func (Int8Codec) PlanEncode(ci *ConnInfo, oid uint32, format int16, value interface{}) EncodePlan {
|
||||
switch format {
|
||||
case BinaryFormatCode:
|
||||
return &encodePlanInt8CodecBinary{}
|
||||
return encodePlanInt8CodecBinary{}
|
||||
case TextFormatCode:
|
||||
return &encodePlanInt8CodecText{}
|
||||
return encodePlanInt8CodecText{}
|
||||
}
|
||||
|
||||
return nil
|
||||
|
||||
+2
-2
@@ -123,9 +123,9 @@ func (Int<%= pg_byte_size %>Codec) PreferredFormat() int16 {
|
||||
func (Int<%= pg_byte_size %>Codec) PlanEncode(ci *ConnInfo, oid uint32, format int16, value interface{}) EncodePlan {
|
||||
switch format {
|
||||
case BinaryFormatCode:
|
||||
return &encodePlanInt<%= pg_byte_size %>CodecBinary{}
|
||||
return encodePlanInt<%= pg_byte_size %>CodecBinary{}
|
||||
case TextFormatCode:
|
||||
return &encodePlanInt<%= pg_byte_size %>CodecText{}
|
||||
return encodePlanInt<%= pg_byte_size %>CodecText{}
|
||||
}
|
||||
|
||||
return nil
|
||||
|
||||
+2
-2
@@ -134,9 +134,9 @@ func (PointCodec) PlanEncode(ci *ConnInfo, oid uint32, format int16, value inter
|
||||
|
||||
switch format {
|
||||
case BinaryFormatCode:
|
||||
return &encodePlanPointCodecBinary{}
|
||||
return encodePlanPointCodecBinary{}
|
||||
case TextFormatCode:
|
||||
return &encodePlanPointCodecText{}
|
||||
return encodePlanPointCodecText{}
|
||||
}
|
||||
|
||||
return nil
|
||||
|
||||
Reference in New Issue
Block a user