ParseDPGVector takes a string of PGVector and returns a DPGVector value.
(s string)
| 3692 | |
| 3693 | // ParseDPGVector takes a string of PGVector and returns a DPGVector value. |
| 3694 | func ParseDPGVector(s string) (Datum, error) { |
| 3695 | v, err := vector.ParseVector(s) |
| 3696 | if err != nil { |
| 3697 | return nil, pgerror.Wrapf(err, pgcode.Syntax, "could not parse vector") |
| 3698 | } |
| 3699 | return NewDPGVector(v), nil |
| 3700 | } |
| 3701 | |
| 3702 | // Format implements the NodeFormatter interface. |
| 3703 | func (d *DPGVector) Format(ctx *FmtCtx) { |
no test coverage detected
searching dependent graphs…