Criteria-pattern

Latest version: v2024.11.5

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

Scan your dependencies

2024.11.05

Changelog

**Release Date:** 2024-11-05

โœจ Features
- **SQL Converter Enhancements:**
- Added `column_mapping` parameter for frontend-backend column name mapping.
- Implemented `not` criteria logic.
- Enabled criteria to generate raw SQL queries.
- Supported selecting all columns with `*`.
- Added `not like` operator.
- Supported all filter operators.
- Enhanced SQL injection prevention for `where` clauses, table, column, and criteria field injections.

- **Refinements in Criteria Operations:**
- Changed filter operators to SQL-specific operators.
- Enabled `and` and `or` operators to handle left and right orders.
- Added `has_filters` and `has_orders` detection methods.
- Converted orders auxiliary variable from list to string for optimization.

- **Enhanced Test and Mocking Utilities:**
- Created test utility classes for `criteria`, `order`, and `filter`.
- Developed tests for `not` criteria and column mapping.

๐Ÿ”จ Refactoring
- **SQL Conversion and Filtering:**
- Removed `converter` interface.
- Simplified `where` condition creation in SQL converter.
- Moved recursive logic in SQL converter to a dedicated method.

- **Miscellaneous Refactors:**
- Updated enums to uppercase.
- Added `nosec` comments for security compliance.
- Updated order operations for improved clarity.

๐Ÿ› Bug Fixes
- **Criteria and Filter Fixes:**
- Fixed access issues with `or` and `and` criteria filters.
- Resolved `dict.get` default argument errors.
- Adjusted `NOT` operator placement for clarity.
- Ensured `filter operator` enum uniqueness.
- Corrected `requirements` parameter handling in Makefile.

๐Ÿ‘ท๐Ÿป CI/CD and Build Improvements
- **Pipeline Updates:**
- Updated CI to use Python 3.13.
- Refined pre-commit hooks.
- Added environment variables for CI workflows.
- Enforced exact version usage in workflows.
- Introduced code quality checks and activated workflows only for PRs to `master`.
- Improved dependency versioning flexibility.

- **Build Changes:**
- Added `py.typed` for type-checking.
- Updated Faker and sqlglot as development dependencies.
- Introduced date-based versioning and development dependency upgrades.

๐Ÿ“š Documentation
- **Readme and Docstrings:**
- Added usage examples in `README`.
- Enhanced SQL converter and criteria docstrings with examples.

๐Ÿงช Tests
- Implemented additional tests for `not` criteria logic.
- Verified column mapping and SQL injection prevention measures.

---
**Full Changelog**: https://github.com/adriamontoto/criteria-pattern/compare/v2024.09.07...v2024.11.05

2024.09.07

What's Changed
* Prepare package to publish version 2024.09.07 by adriamontoto in https://github.com/adriamontoto/criteria-pattern/pull/2


**Full Changelog**: https://github.com/adriamontoto/criteria-pattern/compare/v0.0.1...v2024.09.07

Links

Releases

Has known vulnerabilities

ยฉ 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.