MCPcopy Create free account
hub / github.com/pgadmin-org/pgadmin4 / getTableData

Function getTableData

web/pgadmin/misc/statistics/static/js/Statistics.jsx:84–100  ·  view source on GitHub ↗
(res, node)

Source from the content-addressed store, hash-verified

82}
83
84function getTableData(res, node) {
85 let nodeStats = [],
86 colData;
87 if (res.data.data) {
88 let data = res.data.data;
89 if (node.hasCollectiveStatistics || data['rows'].length > 1) {
90 data.rows.forEach((row) => {
91 nodeStats.push({ ...row, icon: '' });
92 });
93 colData = getColumn(data.columns, false, node.statsPrettifyFields);
94 } else {
95 nodeStats = createSingleLineStatistics(data, node.statsPrettifyFields);
96 colData = getColumn(data.columns, true);
97 }
98 }
99 return [nodeStats, colData];
100}
101
102function createSingleLineStatistics(data, prettifyFields) {
103 let row = data['rows'][0],

Callers 1

StatisticsFunction · 0.85

Calls 2

getColumnFunction · 0.85

Tested by

no test coverage detected