Skip to content

Create static configuration objects with the relevant structure for popular CSV importers #9

Open
@scottmatthewman

Description

@scottmatthewman

Different applications that are capable of importing CSV files have different ways of handling some data types. Indeed, that it why CSVEncoderConfiguration exists.

But each app generally wants the same format all the time, and developers shouldn’t need to have to remember (or investigate) which date formats are needed for the most popular apps.

We could provide static instances of CSVEncoderConfiguration that have the necessary encoding strategies predefined, for example:

CSVEncoderConfiguration.excel // All the necessary config to ensure CSV files are readable by Microsoft Excel
CSVEncoderConfiguration.numbers // All the necessary config to ensure CSV files are readable by Apple Numbers

This would make the definitions more expressive while hiding the implementation detail:

let table = CSVTable<Person>(columns: [  ], configuration: .excel)

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions