MCPcopy
hub / github.com/geldata/gel / visit_NullRelation

Method visit_NullRelation

edb/pgsql/codegen.py:258–270  ·  view source on GitHub ↗
(self, node: pgast.NullRelation)

Source from the content-addressed store, hash-verified

256 self.write(common.qname(node.schemaname, node.name))
257
258 def visit_NullRelation(self, node: pgast.NullRelation) -> None:
259 self.write('(SELECT ')
260 if node.target_list:
261 self.visit_list(node.target_list)
262 if node.where_clause:
263 self.indentation += 1
264 self.new_lines = 1
265 self.write('WHERE')
266 self.new_lines = 1
267 self.indentation += 1
268 self.visit(node.where_clause)
269 self.indentation -= 2
270 self.write(')')
271
272 def visit_SelectStmt(self, node: pgast.SelectStmt) -> None:
273 parenthesize = not self.is_toplevel

Callers

nothing calls this directly

Calls 3

writeMethod · 0.95
visitMethod · 0.95
visit_listMethod · 0.80

Tested by

no test coverage detected