Repository navigation
v0.7.0
The latest version introduces the DBField function to extend Pydantic's Field for more customized database operations. Here are the main changes:
New Features
- Created the
DBFieldfunction infields.pyto extend Pydantic'sField. - Replaced
FieldwithDBFieldin the codebase to support customon_deleteanduniqueoptions.
Features and Roadmap
- Define table schema using Pydantic models
- Basic CRUD operations
- Save data to the database
- Read data from the database
- Update data in the database
- Delete data from the database
- Relationships between tables
- One-to-many
- Create a tables with a foreign key
- Save data with a foreign key
- Read data with a foreign key
- Update data with a foreign key
- Delete data with a foreign key
- Cascade
- Set null
- Restrict
- Set default
- No action
- One-to-one
- Many-to-many
- One-to-many
- Unique constraints
- Remove table
- Read all data from the database
- Filter data and retrieve multiple records
- Equal
- Not equal
- Greater than
- Greater than or equal
- Less than
- Less than or equal
- Contains
- Pagination
- Update table schema
- Custom primary key
- Bulk operations (save, update, delete)
- Migrations
Full Changelog: v0.6.1...v0.7.0