MCPcopy
hub / github.com/jackc/pgx / PlanEncode

Method PlanEncode

pgtype/jsonb.go:21–33  ·  pgtype/jsonb.go::JSONBCodec.PlanEncode
(m *Map, oid uint32, format int16, value any)

Source from the content-addressed store, hash-verified

19}
20
21func (c *JSONBCodec) PlanEncode(m *Map, oid uint32, format int16, value any) EncodePlan {
22 switch format {
23 case BinaryFormatCode:
24 plan := (&JSONCodec{Marshal: c.Marshal, Unmarshal: c.Unmarshal}).PlanEncode(m, oid, TextFormatCode, value)
25 if plan != nil {
26 return &encodePlanJSONBCodecBinaryWrapper{textPlan: plan}
27 }
28 case TextFormatCode:
29 return (&JSONCodec{Marshal: c.Marshal, Unmarshal: c.Unmarshal}).PlanEncode(m, oid, format, value)
30 }
31
32 return nil
33}
34
35type encodePlanJSONBCodecBinaryWrapper struct {
36 textPlan EncodePlan

Callers

nothing calls this directly

Calls 1

PlanEncodeMethod · 0.65

Tested by

no test coverage detected