MCPcopy Create free account
hub / github.com/Shazbot/WH3-Mod-Manager / getRowsForPackedFile

Function getRowsForPackedFile

src/nodeExecutor.ts:62–82  ·  view source on GitHub ↗
(
  packedFile: Pick<PackedFile, "schemaFields" | "tableSchema">,
  executionContext?: FlowExecutionContext,
)

Source from the content-addressed store, hash-verified

60};
61
62const getRowsForPackedFile = (
63 packedFile: Pick<PackedFile, "schemaFields" | "tableSchema">,
64 executionContext?: FlowExecutionContext,
65): AmendedSchemaField[][] => {
66 if (!packedFile.schemaFields || !packedFile.tableSchema) {
67 return [];
68 }
69
70 if (!executionContext) {
71 return chunkSchemaIntoRows(packedFile.schemaFields, packedFile.tableSchema) as AmendedSchemaField[][];
72 }
73
74 const cachedRows = executionContext.rowsByPackedFile.get(packedFile as PackedFile);
75 if (cachedRows) {
76 return cachedRows;
77 }
78
79 const rows = chunkSchemaIntoRows(packedFile.schemaFields, packedFile.tableSchema) as AmendedSchemaField[][];
80 executionContext.rowsByPackedFile.set(packedFile as PackedFile, rows);
81 return rows;
82};
83
84const getColumnIndexForPackedFile = (
85 packedFile: Pick<PackedFile, "tableSchema">,

Callers 15

executeFilterNodeFunction · 0.70
executeMultiFilterNodeFunction · 0.70
executeMathMaxNodeFunction · 0.70
executeMathCeilNodeFunction · 0.70
executeMergeChangesNodeFunction · 0.70
executeIndexTableNodeFunction · 0.70

Calls 2

chunkSchemaIntoRowsFunction · 0.90
getMethod · 0.65

Tested by

no test coverage detected