Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

As a backend developer I want to implement a method in the repository layer capable of storing a set of lines in a CSV file #20

Closed
LuigimonSoft opened this issue Feb 23, 2024 · 0 comments · Fixed by #28
Assignees
Labels
enhancement New feature or request

Comments

@LuigimonSoft
Copy link
Owner

Store Multiple Lines in a CSV File

As a backend developer,

I want to implement a method in the repository layer capable of storing a set of lines in a CSV file,

So that we can efficiently save data in a structured format, facilitating data persistence and later retrieval for processing or reporting purposes.

Acceptance Criteria

  • Given a set of data entries that need to be stored,
    When I call the method to store these entries in a CSV file,
    Then the method should format the entries as CSV lines and append them to the specified CSV file, ensuring that each entry is stored on a new line.

  • Given the possibility of concurrent write operations to the CSV file,
    When multiple instances of the method are invoked simultaneously,
    Then the method should implement locking or a queuing mechanism to prevent data corruption or loss.

  • Given a need to store data entries with various fields,
    When the method formats the entries for the CSV file,
    Then it should correctly handle and escape special characters (e.g., commas, newlines) within the data to maintain the integrity of the CSV format.

  • Given a scenario where the target CSV file does not exist,
    When I attempt to store data entries using the method,
    Then the method should create the CSV file with appropriate headers based on the data structure before appending the entries.

@LuigimonSoft LuigimonSoft added the enhancement New feature or request label Feb 23, 2024
@LuigimonSoft LuigimonSoft self-assigned this Feb 23, 2024
@LuigimonSoft LuigimonSoft moved this to Todo in CsvDataMapper Feb 23, 2024
@LuigimonSoft LuigimonSoft moved this from Todo to In Progress in CsvDataMapper Feb 23, 2024
LuigimonSoft added a commit that referenced this issue Feb 24, 2024
@LuigimonSoft LuigimonSoft linked a pull request Feb 24, 2024 that will close this issue
LuigimonSoft added a commit that referenced this issue Feb 24, 2024
…thod-in-the-repository-layer-capable-of-storing-a-set-of-lines-in-a-csv-file

#20 Add methods to write file
@github-project-automation github-project-automation bot moved this from In Progress to Done in CsvDataMapper Feb 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
Status: Done
Development

Successfully merging a pull request may close this issue.

1 participant