MCPcopy Create free account
hub / github.com/PostHog/duckgres / cloneNode

Function cloneNode

transpiler/transform/operators.go:857–859  ·  view source on GitHub ↗

cloneNode deep-copies an AST node so an operand can appear at several positions in the emitted expression without sharing mutable state.

(node *pg_query.Node)

Source from the content-addressed store, hash-verified

855// cloneNode deep-copies an AST node so an operand can appear at several
856// positions in the emitted expression without sharing mutable state.
857func cloneNode(node *pg_query.Node) *pg_query.Node {
858 return proto.Clone(node).(*pg_query.Node)
859}
860
861// createJSONContainsFuncCall rewrites `a @> b` to json_contains(a, b), matching
862// Postgres jsonb containment for the common object/array cases.

Callers 3

createJSONConcatExprMethod · 0.85
jsonTypeEqualsFunction · 0.85
isNullTestFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected