You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat: add automatic REGEXP functions registration for SQLite
- Add registerRegexpFunctions() method to SqliteDialect
- Automatically register REGEXP, regexp_replace, and regexp_extract functions using PHP preg_* functions
- Add enable_regexp configuration option (default: true) to allow disabling automatic registration
- Update SQLite HelpersTests to remove manual REGEXP availability check
- Update documentation with enable_regexp option and automatic registration information
This eliminates the need for external REGEXP extensions in SQLite by using PHP's built-in regex functions.
Copy file name to clipboardExpand all lines: README.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -47,7 +47,7 @@ Built on top of PDO with **zero external dependencies**, it offers:
47
47
-**Enhanced Error Diagnostics** - Query context, sanitized parameters, and debug information in exceptions
48
48
-**Connection Retry** - Automatic retry with exponential backoff
49
49
-**PSR-14 Event Dispatcher** - Event-driven architecture for monitoring, auditing, and middleware
50
-
-**80+ Helper Functions** - SQL helpers for strings, dates, math, JSON, aggregations, and more (REPEAT, REVERSE, LPAD, RPAD emulated for SQLite)
50
+
-**80+ Helper Functions** - SQL helpers for strings, dates, math, JSON, aggregations, and more (REPEAT, REVERSE, LPAD, RPAD emulated for SQLite; REGEXP operations supported across all dialects)
51
51
-**Fully Tested** - 1320 tests, 5249 assertions across all dialects
PDOdb automatically registers REGEXP functions (`REGEXP`, `regexp_replace`, `regexp_extract`) for SQLite connections using PHP's `preg_*` functions. This happens automatically when creating a SQLite connection.
**Note**: If you disable automatic registration, you must manually register REGEXP functions or load a REGEXP extension. The automatic registration uses PHP's `preg_match`, `preg_replace`, and `preg_match` functions, so no external extensions are required.
472
+
267
473
## Next Steps
268
474
269
475
-[Numeric Helpers](numeric-helpers.md) - Math operations
0 commit comments