MCPcopy Create free account
hub / github.com/dolthub/doltgresql / nodeWith

Function nodeWith

server/ast/with.go:62–80  ·  view source on GitHub ↗

nodeWith handles *tree.With nodes.

(ctx *Context, node *tree.With)

Source from the content-addressed store, hash-verified

60
61// nodeWith handles *tree.With nodes.
62func nodeWith(ctx *Context, node *tree.With) (*vitess.With, error) {
63 if node == nil {
64 return nil, nil
65 }
66
67 ctes := make([]*vitess.CommonTableExpr, len(node.CTEList))
68 for i, cte := range node.CTEList {
69 var err error
70 ctes[i], err = nodeCTE(ctx, cte)
71 if err != nil {
72 return nil, err
73 }
74 }
75
76 return &vitess.With{
77 Recursive: node.Recursive,
78 Ctes: ctes,
79 }, nil
80}

Callers 4

nodeUpdateFunction · 0.85
nodeDeleteFunction · 0.85
nodeInsertFunction · 0.85
nodeSelectFunction · 0.85

Calls 1

nodeCTEFunction · 0.85

Tested by

no test coverage detected