public static String commaSeparatedNames ( List < Field > fieldsToJoin , String prefix , boolean csvOutput ) { return fieldsToJoin . stream ( ) // NOTE: This previously only prefixed fields that were foreign refs or key fields. However, this // caused an issue where shared fields were ambiguously referenced in a select query (specifically, // wheelchair_accessible in routes and trips). So this filter has been removed. . map ( f -> f . getColumnExpression ( prefix , csvOutput ) ) . collect ( Collectors . joining ( ", " ) ) ; }
Prepend a prefix string to each field and join them with a comma + space separator . Also if an export to GTFS is being performed certain fields need a translation from the database format to the GTFS format . Otherwise the fields are assumed to be asked in order to do a database - to - database export and so the verbatim values of the fields are needed .