commons-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Romain Manni-Bucau (JIRA)" <j...@apache.org>
Subject [jira] [Comment Edited] (CSV-163) add a basic mapping feature
Date Fri, 20 Nov 2015 22:11:11 GMT

    [ https://issues.apache.org/jira/browse/CSV-163?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15018556#comment-15018556
] 

Romain Manni-Bucau edited comment on CSV-163 at 11/20/15 10:10 PM:
-------------------------------------------------------------------

was to show we need both. For read we can either use index of named access (CSVRecord.get())
depending the user mapping/desire and for write we likely need both to be able to generate
the headers if needed.

I'll push a light feature close to tht to batchee likely this week or early next week but
would be awesome to kind of merge. I'll put the link to the sample there once done.

edit: here the experimental feature: https://github.com/apache/incubator-batchee/blob/20fad4b9d3a00a710a5b0b5736b8fdc0eced5ec9/extensions/commons-csv/src/test/java/org/apache/batchee/csv/CommonsCsvReaderWithDefaultMapperTest.java#L90


was (Author: romain.manni-bucau):
was to show we need both. For read we can either use index of named access (CSVRecord.get())
depending the user mapping/desire and for write we likely need both to be able to generate
the headers if needed.

I'll push a light feature close to tht to batchee likely this week or early next week but
would be awesome to kind of merge. I'll put the link to the sample there once done.

> add a basic mapping feature
> ---------------------------
>
>                 Key: CSV-163
>                 URL: https://issues.apache.org/jira/browse/CSV-163
>             Project: Commons CSV
>          Issue Type: New Feature
>            Reporter: Romain Manni-Bucau
>
> would be neat to be able to map records instead of using string based access:
> {code}
> public class MyRecored {
>     @Csv(position = 1) String name;
>     @Csv(name = "city") String city;
> // ...
> }
> {code}
> Think it is acceptable to support only basic types (primitives + String/Date to start).
This constraint would keep the code light and simple - no converter - but easier to use than
"map"-like API .



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message