Skip to content

Conversation

@NFUChen
Copy link
Contributor

@NFUChen NFUChen commented Jun 19, 2025

feat: Enhance Query and SkipAutoImplmentation decorators with detailed docstrings

  • Added comprehensive docstrings to the Query and SkipAutoImplmentation decorators, outlining their usage and expected method signatures.
  • Updated the Query decorator to process string arguments correctly by surrounding them with quotes in the generated SQL query.
  • Modified test cases to reflect the updated query syntax in the UserRepository class.
…d docstrings - Added comprehensive docstrings to the `Query` and `SkipAutoImplmentation` decorators, outlining their usage and expected method signatures. - Updated the `Query` decorator to process string arguments correctly by surrounding them with quotes in the generated SQL query. - Modified test cases to reflect the updated query syntax in the `UserRepository` class.
- Added `ConditionNotation` Enum to improve clarity in query conditions. - Updated `CrudRepositoryImplementationService` to utilize the new Enum for handling logical conditions in query execution, replacing string literals with Enum members for better type safety and readability.
- Removed the `Query` decorator implementation from `crud_repository_implementation_service.py` and moved it to a new `query.py` file for better organization. - Updated the `ConditionNotation` class to inherit from `str` and `Enum` for improved functionality. - Cleaned up imports in `crud_repository_implementation_service.py` and added necessary imports in `query.py`. - Enhanced the `Query` decorator with detailed docstrings and improved type handling for SQL query generation.
- Introduced the `@Query` decorator for defining custom SQL queries in repositories. - Expanded the `User` model to include `age` and `status` fields. - Updated `UserRepository` with additional dynamic query methods for enhanced data retrieval. - Enhanced the README with detailed examples of dynamic and custom query usage.
@NFUChen NFUChen changed the title feat: Enhance Query and SkipAutoImplmentation decorators with detaile… Add Custom SQL Query Support with @query Decorator Jun 19, 2025
@NFUChen NFUChen merged commit b89d277 into main Jun 19, 2025
1 check passed
@NFUChen NFUChen deleted the enhancement/query branch June 19, 2025 02:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

3 participants