MCPcopy Create free account
hub / github.com/cockroachdb/cockroachdb-parser / ParseDPGVector

Function ParseDPGVector

pkg/sql/sem/tree/datum.go:3694–3700  ·  view source on GitHub ↗

ParseDPGVector takes a string of PGVector and returns a DPGVector value.

(s string)

Source from the content-addressed store, hash-verified

3692
3693// ParseDPGVector takes a string of PGVector and returns a DPGVector value.
3694func 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.
3703func (d *DPGVector) Format(ctx *FmtCtx) {

Callers 1

ParseAndRequireStringFunction · 0.85

Calls 3

ParseVectorFunction · 0.92
WrapfFunction · 0.92
NewDPGVectorFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…