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

Method Value

pgtype/box.go:53–63  ·  view source on GitHub ↗

Value implements the [database/sql/driver.Valuer] interface.

()

Source from the content-addressed store, hash-verified

51
52// Value implements the [database/sql/driver.Valuer] interface.
53func (src Box) Value() (driver.Value, error) {
54 if !src.Valid {
55 return nil, nil
56 }
57
58 buf, err := BoxCodec{}.PlanEncode(nil, 0, TextFormatCode, src).Encode(src, nil)
59 if err != nil {
60 return nil, err
61 }
62 return string(buf), err
63}
64
65type BoxCodec struct{}
66

Callers 15

TestTraceExecFunction · 0.45
TestTraceQueryFunction · 0.45
TestTraceBatchNormalFunction · 0.45
TestTraceBatchCloseFunction · 0.45
TestTraceCopyFromFunction · 0.45
TraceQueryEndMethod · 0.45
TraceBatchEndMethod · 0.45
TraceCopyFromEndMethod · 0.45
TraceConnectEndMethod · 0.45
TracePrepareEndMethod · 0.45

Calls 2

EncodeMethod · 0.65
PlanEncodeMethod · 0.65

Tested by 9

TestTraceExecFunction · 0.36
TestTraceQueryFunction · 0.36
TestTraceBatchNormalFunction · 0.36
TestTraceBatchCloseFunction · 0.36
TestTraceCopyFromFunction · 0.36
LogMethod · 0.36
TestTraceAcquireFunction · 0.36