Closed maheshsattala closed 1 month ago
The changes in this pull request enhance the get_collection_data
function across multiple files by allowing it to accept lists of keys and values instead of single strings. This enables more flexible query construction. Additionally, a new endpoint, get_collection_data_with_id
, is introduced for fetching collection data based on a specific identifier. Tests have been added to ensure proper handling of mismatched input lengths and to validate the retrieval of collection data with multiple filters, improving the overall robustness of the data retrieval functionality.
Files | Change Summary |
---|---|
kairon/api/app/routers/bot/data.py |
Updated get_collection_data to accept lists of keys and values; added get_collection_data_with_id endpoint. |
kairon/shared/cognition/processor.py |
Modified get_collection_data method to handle lists of keys and values; added get_collection_data_with_id method. |
tests/integration_test/services_test.py |
Added tests for mismatched key-value lengths; expanded existing tests for new key naming conventions; added tests for get_collection_data_with_id . |
tests/unit_test/data_processor/data_processor_test.py |
Introduced tests for error handling and data retrieval with various filter conditions, including get_collection_data_with_id . |
get_collection_data
method in kairon/shared/cognition/processor.py
to handle lists of keys and values, aligning with the changes made in this PR.🐇 In the garden, we hop and play,
With keys and values, come what may!
Fetching data, oh what a thrill,
Mismatched lengths? We’ll fix that skill!
Hooray for changes, let’s all cheer,
For smoother queries, we hold dear! 🌼
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?
Added multiple filters in get API and added test cases related to the same.
Summary by CodeRabbit
New Features
Bug Fixes
Tests