| 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} |