Added
- Advanced filters inspired by Django ORM for enhanced querying capabilities.
- Optional bulk operations for update and delete methods.
- Custom soft delete mechanisms integrated into `CRUDFastAPI`, `EndpointCreator`, and `crud_router`.
- Comprehensive test suite for the newly introduced features.
Detailed Changes
Advanced Filters
The advanced filtering system allows for sophisticated querying with support for operators like `__gt`, `__lt`, `__gte`, and `__lte`, applicable across various CRUD operations. This feature significantly enhances the flexibility and power of data retrieval and manipulation within CRUDFastAPI. [Docs here](https://mithun2003.github.io/CRUDFastAPI/advanced/crud/#advanced-filters).
Examples:
- Utilization of advanced filters for precise data fetching and aggregation.
- Implementation examples for fetching records within specific criteria and counting records based on date ranges.
Custom Soft Delete Mechanisms
CRUDFastAPI's soft delete functionality now supports customization, allowing developers to specify alternative column names for `is_deleted` and `deleted_at` fields. This adaptation enables seamless integration with existing database schemas that employ different naming conventions for soft deletion tracking. [Docs here](https://mithun2003.github.io/CRUDFastAPI/advanced/endpoint/#using-endpointcreator-and-crud_router-with-custom-soft-delete-or-update-columns).
Example Configuration:
- Setting up `crud_router` with custom soft delete column names, demonstrating the flexibility in adapting CRUDFastAPI to various database schema requirements.
Bulk Operations
The introduction of optional bulk operations for updating and deleting records provides a more efficient way to handle large datasets, enabling mass modifications or removals with single method calls. This feature is particularly useful for applications that require frequent bulk data management tasks. [Docs here](https://mithun2003.github.io/CRUDFastAPI/advanced/crud/#allow-multiple-updates-and-deletes).
Examples:
- Demonstrating bulk update and delete operations, highlighting the capability to apply changes to multiple records based on specific criteria.
What's Changed
- Addition of advanced filters, bulk operations, and custom soft delete functionalities.
New Contributors
- [YuriiMotov](https://github.com/YuriiMotov)
**Full Changelog**: [View the full changelog](https://github.com/mithun2003/CRUDFastAPI/compare/v0.4.0...v0.5.0)
___