The latest version focuses on enhancing filter capabilities and ensuring comprehensive test coverage. Here are the key changes:
New Features
- Added support for various query operators in the `DBModel` filter method: `BETWEEN`, `NOT LIKE`, `NOT IN`, `IN`, `LIKE`, `lt`, `lte`, `gt`, `gte`, and `not equal`.
Refactoring
- Refactored methods for preparing and handling where conditions to support the new operators and improve code maintainability.
Tests
- Added comprehensive tests for all newly supported filter operators.
- Refactored tests to use prepared data from `prepare_db` for consistency and efficiency.
Documentation
- Updated the `README.md` to document new filter options and mark completed tasks in the checklist.
In summary, this update significantly enhances the filtering capabilities of the `DBModel` and ensures robust testing and documentation for these new features.
Features and Roadmap
- [x] Define table schema using Pydantic models
- [x] Basic CRUD operations
- [x] Save data to the database
- [x] Read data from the database
- [x] Update data in the database
- [x] Delete data from the database
- [x] Relationships between tables
- [x] One-to-many
- [x] Create a tables with a foreign key
- [x] Save data with a foreign key
- [x] Read data with a foreign key
- [x] Update data with a foreign key
- [x] Delete data with a foreign key
- [X] Cascade
- [x] Set null
- [x] Restrict
- [x] Set default
- [x] No action
- [x] One-to-one
- [x] Many-to-many
- [x] Unique constraints
- [x] Remove table
- [x] Read all data from the database
- [x] Filter data and retrieve multiple records
- [x] Equal
- [x] Not equal
- [x] Greater than
- [x] Greater than or equal
- [x] Less than
- [x] Less than or equal
- [x] Like (Pattern matching with % and _)
- [x] Not like (Pattern matching with % and _)
- [x] In (List of values)
- [x] Not in (List of values)
- [x] Between (Two values)
- [x] Not between (Two values)
- [ ] Pagination
- [ ] Order by
- [ ] Update table schema
- [ ] Custom primary key
- [ ] Bulk operations (save, update, delete)
- [ ] Migrations
**Full Changelog**: https://github.com/SpaceShaman/ORMagic/compare/v0.7.0...v0.8.0