|
1 | 1 | # Changelog |
2 | 2 |
|
| 3 | +## 1.1.0 - Enhanced Query Capabilities and Bulk Operations |
| 4 | + |
| 5 | +### New Features |
| 6 | +- **Advanced Filter Operators**: Support for comparison operators (eq, neq, gt, gte, lt, lte, like, in, notin, null, notnull) |
| 7 | +- **Field Selection**: Select specific fields in list queries using the `fields` parameter |
| 8 | +- **Count Endpoint**: New `count` action to get record counts with optional filtering (no pagination overhead) |
| 9 | +- **Bulk Operations**: |
| 10 | + - `bulk_create` - Create multiple records in a single transaction |
| 11 | + - `bulk_delete` - Delete multiple records by IDs in a single query |
| 12 | +- **Input Validation**: Added comprehensive input validation for table names, column names, IDs, and query parameters |
| 13 | +- **Response Helper**: Added Response class for standardized API responses (for future use) |
| 14 | +- **Backward Compatibility**: Old filter format (`col:value`) still works alongside new format (`col:op:value`) |
| 15 | + |
| 16 | +### Improvements |
| 17 | +- Fixed SQL injection vulnerability in filter parameter by using parameterized queries with unique parameter names |
| 18 | +- Added Validator class for centralized input validation and sanitization |
| 19 | +- Improved error messages with proper HTTP status codes |
| 20 | +- Enhanced documentation with detailed examples of new features |
| 21 | +- Transaction support for bulk create operations |
| 22 | + |
| 23 | +### Filter Operators |
| 24 | +- `eq` - Equals |
| 25 | +- `neq`/`ne` - Not equals |
| 26 | +- `gt` - Greater than |
| 27 | +- `gte`/`ge` - Greater than or equal |
| 28 | +- `lt` - Less than |
| 29 | +- `lte`/`le` - Less than or equal |
| 30 | +- `like` - Pattern matching |
| 31 | +- `in` - In list (pipe-separated values) |
| 32 | +- `notin`/`nin` - Not in list |
| 33 | +- `null` - Is NULL |
| 34 | +- `notnull` - Is NOT NULL |
| 35 | + |
| 36 | +### Examples |
| 37 | +- Field selection: `/index.php?action=list&table=users&fields=id,name,email` |
| 38 | +- Advanced filtering: `/index.php?action=list&table=users&filter=age:gt:18,status:eq:active` |
| 39 | +- IN operator: `/index.php?action=list&table=orders&filter=status:in:pending|processing|shipped` |
| 40 | +- Count records: `/index.php?action=count&table=users&filter=status:eq:active` |
| 41 | +- Bulk create: `POST /index.php?action=bulk_create&table=users` with JSON array |
| 42 | +- Bulk delete: `POST /index.php?action=bulk_delete&table=users` with `{"ids":[1,2,3]}` |
| 43 | + |
3 | 44 | ## 1.0.0 |
4 | 45 |
|
5 | 46 | - Initial release: automatic CRUD API generator for MySQL/MariaDB. |
|
0 commit comments