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

Function convertSimpleArgument

values.go:16–25  ·  view source on GitHub ↗
(m *pgtype.Map, arg any)

Source from the content-addressed store, hash-verified

14)
15
16func convertSimpleArgument(m *pgtype.Map, arg any) (any, error) {
17 buf, err := m.Encode(0, TextFormatCode, arg, []byte{})
18 if err != nil {
19 return nil, err
20 }
21 if buf == nil {
22 return nil, nil
23 }
24 return string(buf), nil
25}
26
27func encodeCopyValue(m *pgtype.Map, buf []byte, oid uint32, arg any) ([]byte, error) {
28 sp := len(buf)

Callers 1

Calls 1

EncodeMethod · 0.65

Tested by

no test coverage detected