static void collectAllExpressions ( HsqlList set , Expression e , OrderedIntHashSet typeSet , OrderedIntHashSet stopAtTypeSet ) { if ( e == null ) { return ; } if ( stopAtTypeSet . contains ( e . opType ) ) { return ; } for ( int i = 0 ; i < e . nodes . length ; i ++ ) { collectAllExpressions ( set , e . nodes [ i ] , typeSet , stopAtTypeSet ) ; } if ( typeSet . contains ( e . opType ) ) { set . add ( e ) ; } if ( e . subQuery != null && e . subQuery . queryExpression != null ) { e . subQuery . queryExpression . collectAllExpressions ( set , typeSet , stopAtTypeSet ) ; } }
collect all extrassions of a set of expression types appearing anywhere in a select statement and its subselects etc .