Value implements the [database/sql/driver.Valuer] interface.
()
| 63 | |
| 64 | // Value implements the [database/sql/driver.Valuer] interface. |
| 65 | func (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. |
| 79 | type TSVectorWeight byte |
nothing calls this directly
no test coverage detected