示例#1
0
        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);
        }
示例#2
0
        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;
        }