private List <CreateTableStatement> GetCreateTableStatements() { using (var script = new StringReader(_script)) { var parser = new TSql120Parser(false); IList <ParseError> errors; var fragment = parser.Parse(script, out errors); if (fragment != null) { var visitor = new CreateTableVisitor(); fragment.Accept(visitor); return(visitor.Creates); } } return(null); }
private List<CreateTableStatement> GetCreateTableStatements() { using (var script = new StringReader(_script)) { var parser = new TSql120Parser(false); IList<ParseError> errors; var fragment = parser.Parse(script, out errors); if (fragment != null) { var visitor = new CreateTableVisitor(); fragment.Accept(visitor); return visitor.Creates; } } return null; }