(tableRef: TableReference, tables: TableSchema[])
| 41 | } |
| 42 | |
| 43 | function assertIntactTableRef(tableRef: TableReference, tables: TableSchema[]) { |
| 44 | const tableSchema = tables.find(schema => schema.tableName === tableRef.tableName) |
| 45 | if (!tableSchema) { |
| 46 | throw new Error(`No table with name "${tableRef.tableName}" has been defined.`) |
| 47 | } |
| 48 | return tableSchema |
| 49 | } |
| 50 | |
| 51 | function assertNoBrokenColumnRefs(query: Query, tables: TableSchema[]) { |
| 52 | const referencedColumns = resolveColumnReferences(query, tables) |
no outgoing calls
no test coverage detected