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

Function ParseDTSQuery

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

ParseDTSQuery takes a string of TSQuery and returns a DTSQuery value.

(s string)

Source from the content-addressed store, hash-verified

4374
4375// ParseDTSQuery takes a string of TSQuery and returns a DTSQuery value.
4376func ParseDTSQuery(s string) (Datum, error) {
4377 v, err := tsearch.ParseTSQuery(s)
4378 if err != nil {
4379 return nil, pgerror.Wrapf(err, pgcode.Syntax, "could not parse tsquery")
4380 }
4381 return NewDTSQuery(v), nil
4382}
4383
4384// DTSVector is the tsvector Datum.
4385type DTSVector struct {

Callers 1

ParseAndRequireStringFunction · 0.85

Calls 3

ParseTSQueryFunction · 0.92
WrapfFunction · 0.92
NewDTSQueryFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…