Skip to content

v0.5.0

Choose a tag to compare

@SpaceShaman SpaceShaman released this 25 Jul 16:37
· 276 commits to master since this release

In summary, this version introduces new methods for data retrieval and filtering, and includes comprehensive tests to ensure the correct functionality of these new features.

New Features

  • Added a new class method all to DBModel for retrieving all objects from the database.
  • Introduced a filter class method to DBModel for querying objects based on keyword arguments.

Code Refactoring

  • Optimized the get method by extracting common logic into the _fetch_raw_data method in models.py.
  • Improved the _create_instance_from_data method in models.py to handle Iterable data input instead of a tuple.

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
  • Unique constraints
  • Remove table
  • Filter data and retrieve multiple records
  • Read all data from the database
  • Update table schema
  • Custom primary key
  • Bulk operations (save, update, delete)
  • Migrations

Full Changelog: v0.4.1...v0.5.0