(tableName: string, columns: string[], rows: Array<Array<string | number>>)
| 32 | }); |
| 33 | |
| 34 | const createTableSelection = (tableName: string, columns: string[], rows: Array<Array<string | number>>) => { |
| 35 | const schemaFields = rows.flatMap((row) => row.map((value, index) => createSchemaField(columns[index], value))); |
| 36 | |
| 37 | return { |
| 38 | type: "TableSelection", |
| 39 | tables: [ |
| 40 | { |
| 41 | name: `db\\${tableName}`, |
| 42 | fileName: tableName, |
| 43 | sourceFile: { name: `${tableName}.pack`, path: `${tableName}.pack`, loaded: true }, |
| 44 | table: { |
| 45 | name: `db\\${tableName}`, |
| 46 | version: 1, |
| 47 | schemaFields, |
| 48 | tableSchema: { |
| 49 | version: 1, |
| 50 | fields: columns.map((columnName) => createDbField(columnName)), |
| 51 | }, |
| 52 | }, |
| 53 | }, |
| 54 | ], |
| 55 | sourceFiles: [], |
| 56 | tableCount: 1, |
| 57 | }; |
| 58 | }; |
| 59 | |
| 60 | describe("lookup node", () => { |
| 61 | it("cross joins table selections without requiring index columns", async () => { |
no test coverage detected