public static List <SelectStatement> GetSelects(string script)
        {
            var parser = new TSql130Parser(false);

            IList <ParseError> errors;
            var s = parser.Parse(new StringReader(script), out errors);

            var visitor = new SelectVisitor();

            s.Accept(visitor);

            return(visitor.Statements);
        }
Beispiel #2
0
        public static List<SelectStatement> GetSelects(string script)
        {
            var parser = new TSql130Parser(false);

            IList<ParseError> errors;
            var s = parser.Parse(new StringReader(script), out errors);

            var visitor = new SelectVisitor();

            s.Accept(visitor);

            return visitor.Statements;
        }