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

Method format_output

pgcli/explain_output_formatter.py:12–19  ·  view source on GitHub ↗
(self, cur, headers, **output_kwargs)

Source from the content-addressed store, hash-verified

10 self.max_width = max_width
11
12 def format_output(self, cur, headers, **output_kwargs):
13 # explain query results should always contain 1 row each
14 [(data,)] = list(cur)
15 explain_list = json.loads(data)
16 visualizer = Visualizer(self.max_width)
17 for explain in explain_list:
18 visualizer.load(explain)
19 yield visualizer.get_list()

Callers 1

format_outputFunction · 0.80

Calls 3

loadMethod · 0.95
get_listMethod · 0.95
VisualizerClass · 0.90

Tested by

no test coverage detected