Skip to content

Add TryAdd to SepWriterHeader #311

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

Merged
merged 5 commits into from
Apr 24, 2025
Merged

Add TryAdd to SepWriterHeader #311

merged 5 commits into from
Apr 24, 2025

Conversation

aaronleev
Copy link
Contributor

There are situations where the user of the library doesn't care if the column already exists. Instead of always throwing an exception an alternative would be to implement a try pattern to ignore additions that would normally cause an error.

The field SepWriter._colNameToCol is only available internally, so the user can not check if a column already exists without an external data structure or catching the exception from SepWriterHeader.Add.

Copy link

codecov bot commented Apr 23, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 99.58%. Comparing base (2ec79ce) to head (d1161f4).
Report is 1 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #311   +/-   ##
=======================================
  Coverage   99.58%   99.58%           
=======================================
  Files          54       54           
  Lines        4368     4378   +10     
  Branches      511      513    +2     
=======================================
+ Hits         4350     4360   +10     
  Misses         12       12           
  Partials        6        6           
Flag Coverage Δ
Debug 99.26% <100.00%> (+<0.01%) ⬆️
Release 99.60% <100.00%> (+<0.01%) ⬆️
macos-latest 93.33% <100.00%> (+0.01%) ⬆️
ubuntu-latest 99.42% <100.00%> (+<0.01%) ⬆️
windows-latest 99.42% <100.00%> (+<0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@nietras nietras merged commit decedfd into nietras:main Apr 24, 2025
16 checks passed
@nietras
Copy link
Owner

nietras commented Apr 24, 2025

Merged, thanks for the pr!

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.

2 participants