mirror of https://github.com/jackc/pgx.git
Remove useless allocations
parent
4aff33603d
commit
313569db56
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue