Conversation
Codecov Report❌ Patch coverage is
📢 Thoughts on this report? Let us know! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Pull Request: feature/add-find-all-method
Motivation
The primary motivation behind this change is to enhance our database querying capabilities by introducing a more fluent and flexible way to handle find query results. The current implementation of the
Findmethod returns a raw result set that requires additional handling to process and decode. This can lead to repetitive boilerplate code and potential errors in handling query results.Improvements
Fluent API for Query Results:
FindResultInterface, which provides a more structured and fluent API for handling query results.FindResultstruct that implements theFindResultInterface, allowing methods likeAllto decode results directly into the provided destination slice.Enhanced Mocking Capabilities:
MockDatabaseto support the newFindResultInterface, making it easier to write and maintain tests.MockFindResultto simulate the behavior ofFindResultin tests, ensuring consistency between production and test code.Simplified Result Handling:
Allmethod onFindResultsimplifies the process of decoding query results, reducing the risk of errors and making the codebase cleaner.FindResultstructure.Consistency and Readability:
FindResultInterface, the codebase achieves a consistent way of handling query results, improving readability and maintainability.Overall, these changes aim to improve the developer experience by providing a more robust and user-friendly way to handle database query results, while also enhancing the testability and maintainability of the codebase.