Abarorm

Latest version: v5.2.1

Safety actively analyzes 712615 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

Page 1 of 4

5.2.1

We're excited to introduce **bulk create** functionality in AbarORM v5.2.1! This update significantly improves performance by allowing multiple records to be inserted in a single database transaction, reducing overhead and making batch operations more efficient.

What's New?
✅ **Bulk Insert Support** – Insert multiple records at once with a single query.
✅ **Foreign Key Validation** – Ensures that referenced objects exist before insertion.
✅ **Auto-Timestamp Handling** – Properly manages `auto_now` and `auto_now_add` fields.
✅ **Performance Boost** – Reduces database calls, making bulk operations faster and more scalable.

This release is perfect for users handling large datasets or requiring efficient batch processing. Try it out and let us know your feedback! 🚀

5.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`!

5.0.2

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:**
python
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:
bash
pip install --upgrade abarorm

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

with respect ProdByGodfather

5.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.

4.2.3

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](https://prodbygodfather.github.io/abarorm/).

Thank you for using **abarorm**!

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!

Page 1 of 4

© 2025 Safety CLI Cybersecurity Inc. All Rights Reserved.