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

Method Value

pgtype/tsvector.go:65–76  ·  view source on GitHub ↗

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

()

Source from the content-addressed store, hash-verified

63
64// Value implements the [database/sql/driver.Valuer] interface.
65func (t TSVector) Value() (driver.Value, error) {
66 if !t.Valid {
67 return nil, nil
68 }
69
70 buf, err := TSVectorCodec{}.PlanEncode(nil, 0, TextFormatCode, t).Encode(t, nil)
71 if err != nil {
72 return nil, err
73 }
74
75 return string(buf), nil
76}
77
78// TSVectorWeight represents the weight label of a lexeme position in a tsvector.
79type TSVectorWeight byte

Callers

nothing calls this directly

Calls 2

EncodeMethod · 0.65
PlanEncodeMethod · 0.65

Tested by

no test coverage detected