Skip to content

Commit 2de374e

Browse files
authored
Merge pull request #2 from BitsHost/copilot/suggest-enhancements-for-documentation
[WIP] Suggest enhancements for project documentation
2 parents 0878054 + b560331 commit 2de374e

File tree

8 files changed

+1449
-32
lines changed

8 files changed

+1449
-32
lines changed

CHANGELOG.md

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,46 @@
11
# Changelog
22

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+
344
## 1.0.0
445

546
- Initial release: automatic CRUD API generator for MySQL/MariaDB.

0 commit comments

Comments
 (0)