public void toSingletonString(StringBuilder sb,boolean forceSingle){
  sb.append("$");
  for (  String step : steps) {
    if (step.charAt(0) != '[') {
      sb.append(".");
      sb.append(step);
      if (forceSingle)       sb.append("[0]");
    }
  }
}

public void toSingletonString ( StringBuilder sb , boolean forceSingle ) { sb . append ( "$" ) ; for ( String step : steps ) { if ( step . charAt ( 0 ) != '[' ) { sb . append ( "." ) ; sb . append ( step ) ; if ( forceSingle ) sb . append ( "[0]" ) ; } } }
build a path to a singleton , ignoring array steps and optionally adding [ 0 ] steps as needed . the path is appended into the supplied stringbuilder . these paths are suitable for order - by clauses and index columns .
