Repository navigation
feat(database): add aggregate capability - #19
Merged
Merged
Conversation
Add an optional Aggregator interface with MongoDB option forwarding and complete MockDatabase response, queue, call-tracking, reset, and test support.
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
Adds aggregation pipeline support as an optional database capability, enabling consumers to execute MongoDB aggregate queries through the shared database abstraction without coupling application code directly to the MongoDB driver.
This change improves the flexibility of the database layer by introducing a dedicated
Aggregatorinterface that cleanly extends existing capabilities while keeping pipeline construction and decoding under consumer control. Both the real MongoDB client and the mock database now support aggregation, ensuring feature parity between production and test environments.The mock implementation includes:
Comprehensive tests were added to validate aggregate option filtering, result handling, error propagation, and mock behavior. This makes aggregation-based features easier to test reliably while preserving the lightweight and composable design of the current database package.