[#7802] Record.formatCSV() should format nested records recursively

This commit is contained in:
lukaseder 2018-10-09 10:55:11 +02:00
parent c2e0db37ba
commit a5ccd30ca6

View File

@ -395,7 +395,11 @@ abstract class AbstractCursor<R extends Record> extends AbstractFormattable impl
if ("".equals(value.toString()))
return format.emptyString();
String result = format0(value, false, false);
// [#7802] Nested records should generate nested CSV data structures
String result = (value instanceof Formattable)
? ((Formattable) value).formatCSV(format)
: format0(value, false, false);
switch (format.quote()) {
case NEVER:
return result;