public final void parse ( final SelectStatement selectStatement ) { if ( ! lexerEngine . skipIfEqual ( DefaultKeyword . ORDER ) ) { return ; } List < OrderItem > result = new LinkedList <> ( ) ; lexerEngine . skipIfEqual ( OracleKeyword . SIBLINGS ) ; lexerEngine . accept ( DefaultKeyword . BY ) ; do { Optional < OrderItem > orderItem = parseSelectOrderByItem ( selectStatement ) ; if ( orderItem . isPresent ( ) ) { result . add ( orderItem . get ( ) ) ; } } while ( lexerEngine . skipIfEqual ( Symbol . COMMA ) ) ; selectStatement . getOrderByItems ( ) . addAll ( result ) ; }
Parse order by .