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

Function makeDoStmt

pkg/sql/plpgsql/parser/lexer.go:368–378  ·  view source on GitHub ↗

makeDoStmt analyzes and parses the options supplied to a DO statement.

(options tree.DoBlockOptions)

Source from the content-addressed store, hash-verified

366
367// makeDoStmt analyzes and parses the options supplied to a DO statement.
368func makeDoStmt(options tree.DoBlockOptions) (*plpgsqltree.DoBlock, error) {
369 doBlockBodyStr, err := tree.AnalyzeDoBlockOptions(options)
370 if err != nil {
371 return nil, err
372 }
373 parsedStmt, err := Parse(string(doBlockBodyStr))
374 if err != nil {
375 return nil, err
376 }
377 return &plpgsqltree.DoBlock{Block: parsedStmt.AST}, nil
378}
379
380// ParseReturnExpr handles reading and parsing the expression for a RETURN or
381// RETURN NEXT statement, which can be nonexistent.

Callers 2

initFunction · 0.85
ParseMethod · 0.85

Calls 2

AnalyzeDoBlockOptionsFunction · 0.92
ParseFunction · 0.70

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…