public static LexerEngine newInstance ( final DatabaseType dbType , final String sql ) { switch ( dbType ) { case H2 : return new LexerEngine ( new H2Lexer ( sql ) ) ; case MySQL : return new LexerEngine ( new MySQLLexer ( sql ) ) ; case Oracle : return new LexerEngine ( new OracleLexer ( sql ) ) ; case SQLServer : return new LexerEngine ( new SQLServerLexer ( sql ) ) ; case PostgreSQL : return new LexerEngine ( new PostgreSQLLexer ( sql ) ) ; default : throw new UnsupportedOperationException ( String . format ( "Cannot support database [%s]." , dbType ) ) ; } }
Create lexical analysis engine instance .