public static List <TableReference> GetTableList(TSqlStatement script) { var tables = new List <TableReference>(); var parser = new TSql130Parser(false); var visitor = new EnumeratorVisitor(); script.Accept(visitor); foreach (var statement in visitor.Nodes) { tables.AddRange(FindTableReferences(statement)); } return(tables); }
public static List<TableReference> GetTableList(TSqlStatement script) { var tables = new List<TableReference>(); var parser = new TSql130Parser(false); var visitor = new EnumeratorVisitor(); script.Accept(visitor); foreach (var statement in visitor.Nodes) { tables.AddRange(FindTableReferences(statement)); } return tables; }