Press n or j to go to the next uncovered block, b, p or k for the previous block.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 | 1x 1x 1x 1x 1x 1x 1x 1x 1x 124x 124x 124x 7x 7x 7x 117x 117x 124x 14x 124x 84x 103x 19x 19x 19x 103x 103x 103x 1x | import {DataDefinition, Table, View} from "../../../objects"; import {ExpressionNode} from "../../nodes"; import {CurrentScope} from "../_current_scope"; import {ReferenceType} from "../_reference"; export type DatabaseTableSource = Table | DataDefinition | View | undefined; export class DatabaseTable { public runSyntax(node: ExpressionNode, scope: CurrentScope, filename: string): DatabaseTableSource { const token = node.getFirstToken(); const name = token.getStr(); if (name === "(") { // dynamic return undefined; } const found = scope.getDDIC().lookupTableOrView2(name); if (found === undefined && scope.getDDIC().inErrorNamespace(name) === true) { throw new Error("Database table or view \"" + name + "\" not found"); } else if (found === undefined) { scope.addReference(token, undefined, ReferenceType.TableVoidReference, filename); } else { scope.addReference(token, found.getIdentifier(), ReferenceType.TableReference, filename); scope.getDDICReferences().addUsing(scope.getParentObj(), {object: found, token: token, filename: filename}); } return found; } } |