You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Jan 22, 2019. It is now read-only.
The current CsvSchema.Builder doesn't support the fluent addition of multiple fields in a single operation. This makes it necessary to break out of the fluent interface temporarily to loop through field names before completing the build.
This could be supported through either 1 or 2 new operations added to CsvSchema.Builder:
public Builder addColumns(Iterable<Column> cs) {
for (Column c : cs) {
_columns.add(c);
}
return this;
}
public Builder addColumns(Iterable<String> names, ColumnType type) {
Builder result = this;
for (String name : names) {
result = addColumn(name, type);
}
return result;
}
Note that CsvSchema itself would match Iterable<Column>, which may or may not be what is most intuitive as it wouldn't copy across all of the other values as the Builder(CsvSchema src) constructor does.
The text was updated successfully, but these errors were encountered:
Fixed via #131 and as per comments, officially included in 2.9, but technically will be included in 2.8.2 already (just not documented). This because master hasn't yet moved to 2.9.0-SNAPSHOT (will do so within next week or so).
The current CsvSchema.Builder doesn't support the fluent addition of multiple fields in a single operation. This makes it necessary to break out of the fluent interface temporarily to loop through field names before completing the build.
This could be supported through either 1 or 2 new operations added to CsvSchema.Builder:
Note that CsvSchema itself would match Iterable<Column>, which may or may not be what is most intuitive as it wouldn't copy across all of the other values as the Builder(CsvSchema src) constructor does.
The text was updated successfully, but these errors were encountered: