Skip to content

Releases: ProdByGodfather/abarorm

v5.1.0

05 Jan 07:30
68b7e0a
Compare
Choose a tag to compare

Release Notes for v5.1.0

New Features and Enhancements:

  1. Enhanced delete Method:

    • The delete method now supports filtering based on multiple fields, not just the id. This makes it more flexible for performing deletion operations based on different conditions in your models.
  2. Improved contains Method:

    • The contains method has been refactored to accept keyword arguments (**kwargs), allowing for a cleaner and more Pythonic syntax. Developers can now filter based on fields using the format Model.all().contains(field_name=value) instead of the previous Model.all().contains('field_name', value).

Benefits:

  • More Flexible Deletions: The updated delete method allows you to specify any field for deletion, increasing its versatility in different use cases.
  • Cleaner Syntax for Filtering: The contains method now supports keyword arguments, offering a more intuitive way to filter results based on field values.

Compatibility:

  • This release introduces breaking changes in the delete and contains methods, so ensure to update your existing code accordingly.

Versioning:

  • This update is part of version 5.1.0.

Thank you for using abarorm!

v5.0.2

30 Dec 07:31
988fd04
Compare
Choose a tag to compare

Version 5.0.2 - Release Notes

Added:

  • contains() Method to QuerySet
    The new contains() method has been added to the QuerySet class, enabling case-insensitive substring searches on fields like CharField and TextField. This method allows for easier querying when partial matches are needed, without the need for custom SQL queries.

    Usage:

    posts = Post.all().contains('Godfather').to_dict()

This feature greatly improves the flexibility of data filtering, especially when dealing with user input that may have varying case styles.

Fixed:

  • Minor optimizations and bug fixes in existing query methods to improve overall performance.

Changed:

  • Updated documentation to reflect the addition of the contains() method and provide examples of how to use it effectively.

Important Notes:

This release introduces breaking changes to the way string-based queries are handled. If you have custom queries or filters involving string matching, you should migrate to using the new contains() method for improved compatibility and flexibility.

Upgrade Instructions: To upgrade to version 5.0.2, run:

pip install --upgrade abarorm

After upgrading, you can start using the contains() method for substring matching in your QuerySet filters.

with respect @ProdByGodfather

v5.0.0

07 Dec 07:46
ebf5065
Compare
Choose a tag to compare

Release Notes - abarorm v5.0.0

Overview

We are excited to announce the release of abarorm v5.0.0, which brings significant bug fixes and improvements, particularly for PostgreSQL users. This release addresses key issues, enhances PostgreSQL compatibility, and introduces several new features designed to improve overall performance and flexibility. The changes in this release ensure that abarorm now works more reliably with PostgreSQL, making it easier for developers to manage their databases.

Major Changes

PostgreSQL Bug Fixes

  • Table Naming Issues Fixed: Resolved issues related to incorrect or inconsistent table names when working with PostgreSQL. This fix ensures that table names are generated according to model definitions and PostgreSQL conventions.

  • Foreign Key Constraints Resolved: Fixed problems where foreign key relationships were not properly enforced in PostgreSQL, preventing errors during inserts and updates involving foreign keys.

  • Optimized Query Performance: Major improvements to query performance, especially with larger datasets. PostgreSQL now handles complex queries more efficiently, including advanced filters and joins.

  • Composite Keys Support: PostgreSQL now supports composite primary keys, which allows for more advanced data modeling with multiple columns acting as a primary key.

New Features

  • Migration System: Introduced a new migration system for PostgreSQL, making it easier to track and apply schema changes incrementally. This is particularly useful for developers working in teams or managing complex database schemas.

  • Bulk Operations: Added support for bulk inserts and updates, significantly improving performance when working with large volumes of data.

  • Transaction Support: PostgreSQL now fully supports multi-step transactions, allowing developers to group operations and commit changes only when all steps succeed, ensuring data integrity.

Improvements

  • Field Customization: Enhanced field customization options, allowing for more complex validation and dynamic properties for fields in PostgreSQL.

  • Query Set Handling: Fixed issues with QuerySet methods such as filter(), exclude(), count(), and to_dict(), ensuring that PostgreSQL users can now perform more complex queries without errors.

v4.2.3

02 Dec 06:05
a594cdd
Compare
Choose a tag to compare

Release Notes: abarorm v4.2.3

New Features and Enhancements

abarorm v4.2.3 introduces new features, performance improvements, and bug fixes to enhance your experience working with the library. Here’s what’s new in this release:

1. New Methods for QuerySet

  • first(): Returns the first result or None if no results exist.
  • last(): Returns the last result or None if no results exist.
  • exists(): Checks whether any records exist in the QuerySet.
  • paginate(page, page_size): Handles pagination of results, returning a subset of the data based on the current page and page size.

2. Improved Filtering and Ordering

  • Advanced filtering support for __gte (greater than or equal) and __lte (less than or equal) to filter by dates, numbers, and other field types.
  • Enhanced sorting with the order_by functionality within the filter() method for more control over query results.

3. New Methods: to_dict() and count()

  • to_dict(): Converts model instances into dictionaries for easier manipulation and serialization.
  • count(): Provides the count of records in a model’s table, making it easier to perform operations that require the number of records.

4. Other Improvements

  • Refactoring and optimization of the codebase to improve query performance and memory usage.

Versioning

This release is part of abarorm v4.2.3. We recommend updating to this version to take advantage of the new features and improvements.


For more details, please refer to the documentation.

Thank you for using abarorm!

v4.0.0

30 Nov 13:35
8d90a4d
Compare
Choose a tag to compare

Release Notes for Version 4.0.0

New Features:

  1. to_dict Method:

    • Converts model instances into dictionaries, making it easier to work with data and serialize it for APIs or external systems.
    • This enhances the flexibility and usability of the ORM, especially when dealing with data manipulation.
  2. count Method:

    • Allows users to count the number of records in a model's table.
    • This is useful for querying the total number of records or after applying filters, improving query efficiency and reporting.

Improvements:

  • __repr__ Method:

    • Added a string representation for model instances, improving debugging and logging experiences.
    • This provides a more readable and informative output when inspecting model instances.
  • Filter Enhancements:

    • The filter method has been improved to support order_by functionality, enabling more flexible and dynamic queries.

Bug Fixes:

  • Fixed Table Naming:

    • Resolved issues with inconsistent table naming conventions, ensuring proper alignment with standard naming practices.
  • Return Values Updated:

    • Updated the return values of methods to provide clearer and more consistent output, enhancing usability.

Important Notes:

  • When adding new fields to models, they will now default to NULL. It's recommended to recreate the database schema after development is complete to ensure fields have appropriate constraints and default values.

Thank you for your contributions, and we look forward to further improvements in future releases!

v3.2.1

12 Nov 05:58
1152fba
Compare
Choose a tag to compare

Release 3.2.1: Database Compatibility Update for SQLite, PostgreSQL, and MySQL

Release Date: 2024-11-12

What's New

This release introduces compatibility enhancements across SQLite, PostgreSQL, and MySQL databases, focusing on data type adjustments, constraint handling, and primary key definitions. These improvements ensure consistent behavior across all supported databases.

Key Updates

  1. Primary Key Adjustments

    • Replaced PostgreSQL-specific SERIAL with cross-compatible primary key configurations:
      • SQLite: INTEGER PRIMARY KEY AUTOINCREMENT
      • MySQL & PostgreSQL: Adapted for native auto-increment behaviors.
  2. DecimalField Data Type Changes

    • Standardized DecimalField across databases:
      • SQLite: Uses REAL due to precision limitations.
      • PostgreSQL & MySQL: Maintains precision handling with appropriate constraints.
  3. Improved Constraint Handling

    • Enhanced NOT NULL constraint management during table creation to prevent issues, especially in SQLite where constraints can't be altered post-creation.
    • Default values added for consistency.
  4. Cross-Database Testing

    • Verified functionality for table creation, data insertion, querying, and filtering across SQLite, PostgreSQL, and MySQL.

Impact

This update enhances stability and performance for projects requiring multi-database support, allowing easy switching between databases without changing model definitions.

For feedback or issues, please refer to Issue #18.

v3.2.0

29 Oct 14:16
8306308
Compare
Choose a tag to compare

abarorm Version 3.2.0 Release Notes

We are excited to announce the release of abarorm version 3.2.0! This version introduces new features and improvements that enhance the functionality and usability of our Object-Relational Mapping (ORM) library for SQLite, MySQL, and PostgreSQL databases.

New Features

  • Advanced Filtering Options:
    • Introduced new lookup expressions __gte (greater than or equal) and __lte (less than or equal) for the filter() method. This allows for more precise and flexible queries when retrieving records from the database.

Bug Fixes

  • Resolved minor issues related to database connections and query execution that enhance overall performance and stability.

Improvements

  • Improved documentation with detailed explanations of the filtering functionality, including usage examples for advanced filtering options.
  • Enhanced code readability and organization to make it easier for contributors and users to understand the library's structure and functionality.

Upgrade Instructions

To upgrade to version 3.2.0, simply run:

pip install --upgrade abarorm

Make sure to check the documentation for additional guidance on using the new features and any other changes in this release.

v3.1.1

12 Oct 09:44
38c04d7
Compare
Choose a tag to compare

Release Notes: ORM Update Functionality Enhancement

Overview

In this release, we have implemented significant enhancements to the update functionality of the ORM. This update introduces two new methods for updating records, providing users with more flexibility and ease of use.

Key Features

  1. Specific Category Update Method:

    • Users can now update the title of a category by its ID through a dedicated method. This simplifies the process and allows for quick updates without requiring additional parameters.
  2. Flexible Post Update Route:

    • A new API route has been added that enables users to update multiple attributes of a post in a single request. This method accepts optional parameters, allowing for comprehensive updates based on user input.

Benefits

  • The new update functionality improves user experience by offering a straightforward method for category updates and a versatile approach for post updates.
  • Users can make multiple changes at once, reducing the number of requests needed to update records.

Testing and Validation

All new features have undergone thorough testing to ensure functionality and reliability. We encourage users to explore the new features and provide feedback for further improvements.

Conclusion

This release marks a significant step forward in enhancing the ORM's capabilities, making it easier for users to manage and update their records efficiently. We look forward to your continued support and feedback as we work to improve the ORM further.

Thank you for your contributions and engagement with our project!

v3.0.2

11 Oct 12:04
8050205
Compare
Choose a tag to compare

Release Notes for abarorm v3.0.2

What's New

We are excited to announce the release of abarorm version 3.0.2! This update brings significant improvements and new features to our lightweight and easy-to-use Object-Relational Mapping (ORM) library for SQLite, MySQL, and PostgreSQL databases.

Key Features

  1. Multi-Database Support:

    • SQLite, MySQL, and PostgreSQL support has been fully implemented.
    • The ORM can now seamlessly switch between databases without code changes, making it suitable for various applications.
  2. Enhanced DateField and DateTimeField Handling:

    • Added support for auto_now and auto_now_add options in DateField and DateTimeField.
    • Automatically set current date and time for fields with these options during record creation and updates.
  3. Robust ForeignKey Management:

    • Improved handling for foreign key relationships.
    • Support for both integer IDs and instances of related models when creating records.
  4. Error Handling:

    • Enhanced error messages for better clarity when foreign key relationships are invalid or when related instances are not found.

Bug Fixes

  • Addressed several issues related to table naming and query generation to ensure compatibility across all supported databases.

Installation

You can install or upgrade abarorm using pip:

pip install abarorm --upgrade

Documentation

For more detailed information on how to use abarorm, please refer to our documentation here.

Contributing

We welcome contributions! If you have suggestions or improvements, please open an issue or submit a pull request.

Thank you for using abarorm! We appreciate your support and feedback.

v3.0.1

07 Oct 12:56
78ae3d0
Compare
Choose a tag to compare

Overview

We are excited to announce the release of version 3.0.1 of the abarorm library. This version brings significant enhancements and new features aimed at improving the usability and functionality of the ORM.

New Features

  1. DateField and DateTimeField Support:

    • Added new field types to handle date and time more effectively.
    • Introduced options auto_now and auto_now_add for automatic date and time management.
  2. Improved create Method:

    • Updated the method to automatically manage date and time fields during record creation and updates, reducing manual input errors.
  3. Database Schema Update:

    • Updated the database schema to ensure proper storage of timestamps.

Conclusion

This release improves the overall experience for users of the abarorm library, making it easier to manage date and time fields in your models. We encourage you to update to the latest version to take advantage of these new features.