MCPcopy
hub / github.com/dbcli/pgcli / functions

Method functions

tests/metadata.py:91–102  ·  view source on GitHub ↗
(self, parent="public", pos=0)

Source from the content-addressed store, hash-verified

89 return [view(escape(x), pos) for x in self.metadata.get("views", {}).get(parent, [])]
90
91 def functions(self, parent="public", pos=0):
92 return [
93 function(
94 escape(x[0])
95 + "("
96 + ", ".join(arg_name + " := " for (arg_name, arg_mode) in zip(x[1], x[3]) if arg_mode in ("b", "i"))
97 + ")",
98 pos,
99 escape(x[0]) + "(" + ", ".join(arg_name for (arg_name, arg_mode) in zip(x[1], x[3]) if arg_mode in ("b", "i")) + ")",
100 )
101 for x in self.metadata.get("functions", {}).get(parent, [])
102 ]
103
104 def schemas(self, pos=0):
105 schemas = {sch for schs in self.metadata.values() for sch in schs}

Callers 3

from_clause_itemsMethod · 0.95
test_functions_queryFunction · 0.45

Calls 2

functionFunction · 0.85
escapeFunction · 0.85

Tested by 1

test_functions_queryFunction · 0.36