MCPcopy
hub / github.com/chartbrew/chartbrew / testQuery

Method testQuery

server/controllers/ChartController.js:965–979  ·  view source on GitHub ↗
(chart)

Source from the content-addressed store, hash-verified

963 }
964
965 testQuery(chart) {
966 return this.connectionController.findById(chart.connection_id)
967 .then((connection) => {
968 const source = findSourceForConnection(connection);
969 if (source?.backend?.runChartQuery) {
970 assertSourceServerEnabled(source);
971 return source.backend.runChartQuery({ connection, query: chart.query });
972 }
973
974 return new Promise((resolve, reject) => reject("The connection type is not supported"));
975 })
976 .catch((error) => {
977 return new Promise((resolve, reject) => reject(error));
978 });
979 }
980
981 getPreviewData(chart, projectId, user, noSource) {
982 return this.chartCache.findLast(user.id, chart.id)

Callers 1

ChartRoute.jsFile · 0.80

Calls 3

findSourceForConnectionFunction · 0.50
findByIdMethod · 0.45

Tested by

no test coverage detected