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

Method doc

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

Source from the content-addressed store, hash-verified

2449}
2450
2451func (node *CursorStmt) doc(p *PrettyCfg) pretty.Doc {
2452 ret := pretty.Nil
2453 fetchType := node.FetchType.String()
2454 if fetchType != "" {
2455 ret = pretty.ConcatSpace(ret, pretty.Keyword(fetchType))
2456 }
2457 if node.FetchType.HasCount() {
2458 ret = pretty.ConcatSpace(ret, pretty.Text(strconv.Itoa(int(node.Count))))
2459 }
2460 return pretty.Fold(pretty.ConcatSpace,
2461 ret,
2462 pretty.Keyword("FROM"),
2463 p.Doc(&node.Name),
2464 )
2465}
2466
2467func (node *FetchCursor) doc(p *PrettyCfg) pretty.Doc {
2468 return pretty.ConcatSpace(pretty.Keyword("FETCH"), node.CursorStmt.doc(p))

Callers

nothing calls this directly

Calls 7

ConcatSpaceFunction · 0.92
KeywordFunction · 0.92
TextFunction · 0.92
FoldFunction · 0.92
HasCountMethod · 0.80
DocMethod · 0.80
StringMethod · 0.65

Tested by

no test coverage detected