UNPKG

@eagleoutice/flowr

Version:

Static Dataflow Analyzer and Program Slicer for the R Programming Language

31 lines 1.6 kB
"use strict"; var __importDefault = (this && this.__importDefault) || function (mod) { return (mod && mod.__esModule) ? mod : { "default": mod }; }; Object.defineProperty(exports, "__esModule", { value: true }); exports.DfShapeQueryDefinition = void 0; const ansi_1 = require("../../../util/text/ansi"); const time_1 = require("../../../util/text/time"); const joi_1 = __importDefault(require("joi")); const df_shape_query_executor_1 = require("./df-shape-query-executor"); const json_1 = require("../../../util/json"); exports.DfShapeQueryDefinition = { executor: df_shape_query_executor_1.executeDfShapeQuery, asciiSummarizer: (formatter, _processed, queryResults, result) => { const out = queryResults; result.push(`Query: ${(0, ansi_1.bold)('df-shape', formatter)} (${(0, time_1.printAsMs)(out['.meta'].timing, 0)})`); result.push(...out.domains.entries().take(20).map(([key, domain]) => { return ` ╰ ${key}: ${JSON.stringify(domain, json_1.jsonReplacer)}`; })); if (out.domains.size > 20) { result.push(' ╰ ... (see JSON)'); } return true; }, schema: joi_1.default.object({ type: joi_1.default.string().valid('df-shape').required().description('The type of the query.'), criterion: joi_1.default.string().optional().description('The slicing criterion of the node to get the dataframe shape for.') }).description('The df-shape query retrieves information on the shape of dataframes'), flattenInvolvedNodes: () => [] }; //# sourceMappingURL=df-shape-query-format.js.map