MCPcopy Create free account
hub / github.com/andywer/postguard / createQueryNodeSubpath

Function createQueryNodeSubpath

src/postgres/query-traversal.ts:26–37  ·  view source on GitHub ↗
(
  path: QueryNodePath<QueryNode<any>>,
  subNode: Node,
  parentPropKey: string
)

Source from the content-addressed store, hash-verified

24}
25
26export function createQueryNodeSubpath<Node extends QueryNode<any>>(
27 path: QueryNodePath<QueryNode<any>>,
28 subNode: Node,
29 parentPropKey: string
30): QueryNodePath<Node> {
31 return {
32 ancestors: [...path.ancestors, path],
33 node: subNode,
34 parentPropKey,
35 type: getNodeType(subNode)
36 }
37}
38
39type TraversalCallback = (path: QueryNodePath<any>, cancelRecursionToken: symbol) => symbol | void
40

Callers 4

getReturningColumnsFunction · 0.90
resolveResTargetFunction · 0.90
traverseArrayFunction · 0.85
traverseSubTreeFunction · 0.85

Calls 1

getNodeTypeFunction · 0.90

Tested by

no test coverage detected