Skip to content

Add ++ to concatenate CSV rows#776

Open
ybasket wants to merge 1 commit into
mainfrom
csv-row-concat
Open

Add ++ to concatenate CSV rows#776
ybasket wants to merge 1 commit into
mainfrom
csv-row-concat

Conversation

@ybasket

@ybasket ybasket commented Jun 1, 2026

Copy link
Copy Markdown
Collaborator

When serializing nested case classes, it comes in handy to be able to concatenate CSV rows (with or without headers), hence this adds a ++ (feel free to bikeshed the name). Also adds Order instances for (CSV)Row as they're useful as well.

When serializing nested case classes, it comes in handy to be able to concatenate CSV rows (with or without headers). Also adds Order instances for (CSV)Row.
@ybasket ybasket requested a review from a team as a code owner June 1, 2026 13:45
}

implicit val orderRow: Order[Row] = Order.by(r => (r.values, r.line))
implicit def orderCsvRow[Header: Order]: Order[CsvRow[Header]] =

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I assume that for the usual header types an Order exists. If that's too strong, we can always introduce a lower priority implicit later.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant