v1.2.8
Version 1.2.8 (December 19, 2025)
π New Features
Enhanced Filtering Capabilities for getAll Operations
This release introduces powerful new filtering capabilities that allow you to filter results by specific fields and perform full-text search simultaneously when using getAll operations.
Field-Based Filtering:
- You can now filter results by any field in your entity by passing the field name and value as query parameters
- Multiple field filters can be combined using AND logic
- Example:
GET /api/v1/users?name=John&active=1will return users where name equals "John" AND active equals 1
Search Functionality:
- The existing
searchparameter now works seamlessly alongside field filters - Search performs a LIKE query across all fields using OR logic
- Example:
GET /api/v1/users?search=johnwill search for "john" in all fields
Combined Filtering:
- Field filters and search can be used together
- Field filters are applied first (AND), then search is applied (OR across all fields)
- Example:
GET /api/v1/users?active=1&search=johnwill return active users that match "john" in any field
π§ Improvements
- Code Refactoring: Improved code organization by separating field extraction and WHERE clause construction logic
- Better Maintainability: Enhanced code readability and efficiency in the
DataBaseclass - Performance: Optimized query building process for better performance
π Technical Details
- Refactored
getWhereSearch()method into two private methods:getFields(): Extracts available fields from the query resultgetWhere(): Constructs the WHERE clause combining field filters and search conditions
- Field filters are automatically detected from query parameters that match entity field names
- Empty field values are ignored to prevent unnecessary filtering
π Migration Notes
This release is backward compatible. Existing APIs using the search parameter will continue to work as before. The new field-based filtering is opt-in and does not affect existing functionality.