|
2 | 2 |
|
3 | 3 | ## [Unreleased] |
4 | 4 |
|
| 5 | +## [3.3.0] - 2025-10-31 |
| 6 | + |
| 7 | +### Fixed |
| 8 | +- **LIKE Pattern Escaping** (fixes #40, #43, #84) |
| 9 | + - Fixed LIKE pattern escaping to use ESCAPE E'\\' syntax for proper backslash handling |
| 10 | + - Updated startsWith() and endsWith() to properly escape special LIKE characters (%, _, \) |
| 11 | + - Prevents SQL syntax errors from patterns containing backslashes |
| 12 | + |
| 13 | +- **JSON Comprehensions** (fixes #48, #84) |
| 14 | + - Fixed comprehensions over JSON arrays to properly use jsonb_array_elements() |
| 15 | + - Corrects SQL generation for expressions like `data.items.all(i, i.quantity > 0)` |
| 16 | + - Ensures JSON array comprehensions work correctly with PostgreSQL |
| 17 | + |
| 18 | +- **String Functions Panic** (fixes #85, #86) |
| 19 | + - Fixed panic: index out of range when using CEL string extension functions as methods |
| 20 | + - Added defensive checks in callCasting, visitCallIndex, visitCallMapIndex, visitCallListIndex, visitCallUnary |
| 21 | + - All string functions now properly handle both method calls (target) and function calls (args) |
| 22 | + |
| 23 | +### Added |
| 24 | +- **CEL String Extension Functions** (#86) |
| 25 | + - Implemented 10 CEL string extension functions with PostgreSQL SQL conversion: |
| 26 | + * `lowerAscii()` → `LOWER()` |
| 27 | + * `upperAscii()` → `UPPER()` |
| 28 | + * `trim()` → `TRIM()` |
| 29 | + * `charAt(index)` → `SUBSTRING(str, index+1, 1)` |
| 30 | + * `indexOf(search, [offset])` → `POSITION()` with -1 for not found |
| 31 | + * `lastIndexOf(search)` → Uses `REVERSE()` logic |
| 32 | + * `substring(start, [end])` → `SUBSTRING()` with proper index conversion |
| 33 | + * `replace(old, new, [limit])` → `REPLACE()` (limit=-1 only) |
| 34 | + * `reverse()` → `REVERSE()` |
| 35 | + - Clear error messages for unsupported functions (split, join, format, quote) |
| 36 | + - Comprehensive test coverage in string_functions_test.go |
| 37 | + |
5 | 38 | ## [3.2.0] - 2025-10-31 |
6 | 39 |
|
7 | 40 | ### Fixed |
|
0 commit comments