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

Method PlanScan

pgtype/jsonb.go:44–56  ·  view source on GitHub ↗
(m *Map, oid uint32, format int16, target any)

Source from the content-addressed store, hash-verified

42}
43
44func (c *JSONBCodec) PlanScan(m *Map, oid uint32, format int16, target any) ScanPlan {
45 switch format {
46 case BinaryFormatCode:
47 plan := (&JSONCodec{Marshal: c.Marshal, Unmarshal: c.Unmarshal}).PlanScan(m, oid, TextFormatCode, target)
48 if plan != nil {
49 return &scanPlanJSONBCodecBinaryUnwrapper{textPlan: plan}
50 }
51 case TextFormatCode:
52 return (&JSONCodec{Marshal: c.Marshal, Unmarshal: c.Unmarshal}).PlanScan(m, oid, format, target)
53 }
54
55 return nil
56}
57
58type scanPlanJSONBCodecBinaryUnwrapper struct {
59 textPlan ScanPlan

Callers

nothing calls this directly

Calls 1

PlanScanMethod · 0.65

Tested by

no test coverage detected