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

Method doc

pkg/sql/sem/tree/pretty.go:2411–2423  ·  view source on GitHub ↗
(p *PrettyCfg)

Source from the content-addressed store, hash-verified

2409}
2410
2411func (node *AnnotateTypeExpr) doc(p *PrettyCfg) pretty.Doc {
2412 if node.SyntaxMode == AnnotateShort {
2413 if typ, ok := GetStaticallyKnownType(node.Type); ok {
2414 switch typ.Family() {
2415 case types.JsonFamily:
2416 if sv, ok := node.Expr.(*StrVal); ok && p.JSONFmt {
2417 return p.jsonCast(sv, ":::", typ)
2418 }
2419 }
2420 }
2421 }
2422 return p.docAsString(node)
2423}
2424
2425func (node *DeclareCursor) docTable(p *PrettyCfg) []pretty.TableRow {
2426 optionsRow := pretty.Nil

Callers

nothing calls this directly

Calls 4

GetStaticallyKnownTypeFunction · 0.85
FamilyMethod · 0.80
jsonCastMethod · 0.80
docAsStringMethod · 0.80

Tested by

no test coverage detected