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

Method Format

pkg/sql/sem/plpgsqltree/statements.go:1229–1245  ·  view source on GitHub ↗
(ctx *tree.FmtCtx)

Source from the content-addressed store, hash-verified

1227}
1228
1229func (s *Open) Format(ctx *tree.FmtCtx) {
1230 ctx.WithAnnotations(s.Annotations, func() {
1231 ctx.WriteString("OPEN ")
1232 ctx.FormatNode(&s.CurVar)
1233 switch s.Scroll {
1234 case tree.Scroll:
1235 ctx.WriteString(" SCROLL")
1236 case tree.NoScroll:
1237 ctx.WriteString(" NO SCROLL")
1238 }
1239 if s.Query != nil {
1240 ctx.WriteString(" FOR ")
1241 ctx.FormatNode(s.Query)
1242 }
1243 ctx.WriteString(";\n")
1244 })
1245}
1246
1247func (s *Open) PlpgSQLStatementTag() string {
1248 return "stmt_open"

Callers

nothing calls this directly

Calls 2

WithAnnotationsMethod · 0.80
FormatNodeMethod · 0.80

Tested by

no test coverage detected