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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unify Appender error handling #191

Merged
merged 1 commit into from Mar 27, 2024

Conversation

taniabogatsch
Copy link
Contributor

This is the first follow-up PR to #187.

It focuses on unifying the error handling in the Appender. Additionally, errors in the Appender no longer kill the application (panic) and have a unified format.

I'm happy that even with the introduction of new tests, this PR decreases the overall code size of the Appender and its tests. 馃槃 Sorry for the big PR - I've tried to keep the complexity low. Many changes are repetitive (using new functions) and structural.

Other changes

  • unified variable name refactoring according to their type definitions and methods (e.g., connector -> c, appender -> a, appender *C.duckdb_appender -> duckdbAppender C.duckdb_appender).
  • added missing C.duckdb_appender_destroy(&duckdbAppender) when the appender's column type initialization fails to avoid leaks.
  • removed duplicate code in appender_test.go by introducing a new function: cleanupAppender.
  • moved error-tests from appender_test.go to errors_test.go.

@marcboeker marcboeker merged commit f3534c6 into marcboeker:main Mar 27, 2024
4 checks passed
@taniabogatsch taniabogatsch deleted the refactor-appender branch March 29, 2024 10:14
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.

None yet

2 participants