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

Function isSubquery

src/postgres/parse-pg-query.ts:58–59  ·  view source on GitHub ↗
(node: QueryParser.QueryNode<any>)

Source from the content-addressed store, hash-verified

56 isParamRef(node.SelectStmt.targetList[0].ResTarget.val)
57
58const isSubquery = (node: QueryParser.QueryNode<any>) =>
59 getNodeType(node).endsWith("Stmt") && !isPlaceholderSelect(node)
60
61const isReturningIntoParentQuery = (path: QueryNodePath<QueryParser.QueryNode<any>>) =>
62 ["larg", "rarg", "selectStmt"].indexOf(path.parentPropKey) > -1

Callers 3

getSubqueriesFunction · 0.85
getTableReferencesFunction · 0.85
getReferencedColumnsFunction · 0.85

Calls 2

getNodeTypeFunction · 0.90
isPlaceholderSelectFunction · 0.85

Tested by

no test coverage detected