@@ -8,6 +8,115 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
88## [ Unreleased]
99
1010
11+ ## [ 2.9.3] - 2025-11-09
12+
13+ ### Added
14+ - ** Regular Expression Helpers** - Cross-database regex support with unified API:
15+ - ** REGEXP_LIKE** (` Db::regexpMatch() ` ) - Pattern matching for all dialects
16+ - ** REGEXP_REPLACE** (` Db::regexpReplace() ` ) - Pattern-based string replacement
17+ - ** REGEXP_EXTRACT** (` Db::regexpExtract() ` ) - Extract matched substrings with capture group support
18+ - ** Automatic SQLite registration** - REGEXP functions automatically registered via ` PDO::sqliteCreateFunction() ` if not available
19+ - ** Configuration option** - ` enable_regexp ` config option for SQLite (default: ` true ` ) to control automatic registration
20+ - ** Cross-dialect support** - MySQL/MariaDB (` REGEXP ` , ` REGEXP_REPLACE ` , ` REGEXP_SUBSTR ` ), PostgreSQL (` ~ ` , ` regexp_replace ` , ` regexp_match ` ), SQLite (via extension or PHP emulation)
21+ - ** Complete documentation** - ` documentation/07-helper-functions/string-helpers.md ` with regex examples
22+ - ** Comprehensive examples** - ` examples/05-helpers/01-string-helpers.php ` demonstrates all regex operations
23+ - ** Full test coverage** - Tests for all dialects including SQLite emulation
24+
25+ - ** JSON Modification Helpers** - Enhanced JSON manipulation capabilities:
26+ - ** ` Db::jsonSet() ` ** - Set JSON values at specific paths (supports nested paths)
27+ - ** ` Db::jsonRemove() ` ** - Remove JSON keys or array elements
28+ - ** ` Db::jsonReplace() ` ** - Replace existing JSON values
29+ - ** MariaDB compatibility** - Proper handling of MariaDB's JSON function differences
30+ - ** Cross-dialect support** - Works consistently across MySQL, MariaDB, PostgreSQL, and SQLite
31+ - ** Complete test coverage** - Comprehensive tests for all JSON modification operations
32+
33+ - ** DEFAULT Helper Support for SQLite** - ` Db::default() ` now works on SQLite:
34+ - ** Automatic translation** - ` DEFAULT ` keyword automatically converted to ` NULL ` for SQLite UPDATE statements
35+ - ** Consistent behavior** - Provides consistent API across all dialects
36+ - ** UPSERT support** - Works correctly in UPSERT operations for SQLite
37+
38+ - ** Savepoints and Nested Transactions** - Advanced transaction management:
39+ - ** Savepoint support** - Create named savepoints within transactions
40+ - ** Nested transactions** - Support for nested transaction patterns
41+ - ** Rollback to savepoint** - Rollback to specific savepoints without affecting outer transactions
42+ - ** Complete documentation** - Transaction management guide with savepoint examples
43+ - ** Examples** - ` examples/34-savepoints/ ` demonstrating savepoint usage
44+
45+ - ** SQLite String Function Emulation** - Additional string functions for SQLite:
46+ - ** ` REPEAT() ` ** - Repeat string N times (emulated via PHP)
47+ - ** ` REVERSE() ` ** - Reverse string characters (emulated via PHP)
48+ - ** ` LPAD() ` ** - Left pad string to specified length (emulated via PHP)
49+ - ** ` RPAD() ` ** - Right pad string to specified length (emulated via PHP)
50+ - ** Automatic registration** - Functions automatically registered via ` PDO::sqliteCreateFunction() `
51+ - ** Cross-dialect compatibility** - Provides consistent API across all dialects
52+
53+ - ** JOIN Support for UPDATE and DELETE** - Advanced DML operations:
54+ - ** UPDATE with JOIN** - Update tables based on JOIN conditions
55+ - ** DELETE with JOIN** - Delete rows based on JOIN conditions
56+ - ** Cross-dialect support** - Works on MySQL, MariaDB, PostgreSQL, and SQLite
57+ - ** Complete documentation** - DML operations guide with JOIN examples
58+ - ** Examples** - ` examples/33-update-delete-join/ ` demonstrating JOIN in UPDATE/DELETE
59+
60+ - ** INSERT ... SELECT Support** - Bulk insert from query results:
61+ - ** ` QueryBuilder::insertFrom() ` ** - Insert rows from SELECT query results
62+ - ** Column mapping** - Map columns from source to target table
63+ - ** Cross-dialect support** - Works consistently across all dialects
64+ - ** Complete documentation** - INSERT operations guide with INSERT ... SELECT examples
65+ - ** Examples** - ` examples/32-insert-select/ ` demonstrating INSERT ... SELECT patterns
66+
67+ - ** Enhanced EXPLAIN Analysis** - Advanced performance metrics:
68+ - ** Performance metrics** - Additional performance indicators in EXPLAIN output
69+ - ** Better recommendations** - Improved query optimization suggestions
70+ - ** Cross-dialect parsing** - Enhanced parsing for MySQL, PostgreSQL, and SQLite EXPLAIN output
71+
72+ - ** Plugin System** - Extend PdoDb with custom functionality:
73+ - ** ` AbstractPlugin ` class** - Base class for creating plugins
74+ - ** ` PdoDb::registerPlugin() ` ** - Register plugins to extend functionality
75+ - ** Macro registration** - Plugins can register QueryBuilder macros
76+ - ** Scope registration** - Plugins can register global scopes
77+ - ** Event listener registration** - Plugins can register event listeners
78+ - ** Complete documentation** - ` documentation/05-advanced-features/plugins.md ` with plugin development guide
79+ - ** Examples** - ` examples/31-plugins/ ` demonstrating plugin creation and usage
80+
81+ ### Changed
82+ - ** Examples Directory Reorganization** - Improved structure for better navigation:
83+ - Reorganized example files into logical groups
84+ - Better organization of advanced features examples
85+ - Improved README files in example directories
86+
87+ - ** Code Quality Improvements** :
88+ - ** Namespace refactoring** - Replaced full namespace paths with ` use ` statements throughout codebase
89+ - ** Better code organization** - Improved maintainability and readability
90+ - ** PSR-12 compliance** - All code follows PSR-12 standards
91+
92+ ### Fixed
93+ - ** Composer Description** - Shortened description for better Packagist display
94+
95+ ### Documentation
96+ - ** README Improvements** - Major enhancements for better onboarding:
97+ - ** Reorganized feature list** - Grouped features into logical categories (Core, Performance, Advanced, Developer Experience)
98+ - ** Added "Why PDOdb?" section** - Value proposition and comparisons vs Raw PDO, Eloquent, and Doctrine
99+ - ** Simplified Quick Example** - Replaced complex JSON example with basic CRUD using SQLite
100+ - ** Added "5-Minute Tutorial"** - Step-by-step guide for quick onboarding
101+ - ** Added FAQ section** - 10 common questions and answers
102+ - ** Added Migration Guide** - Examples for migrating from Raw PDO, Eloquent, Doctrine, and Yii2
103+ - ** Improved structure** - Better navigation and readability
104+ - ** Lower entry barrier** - Easier for new users to understand and adopt
105+
106+ - ** Examples Section Updates** :
107+ - Updated Examples section in README.md with current example structure
108+ - Added Sharding section to README.md
109+ - Replaced chained ` where() ` with ` andWhere() ` in examples and documentation for better clarity
110+
111+ ### Technical Details
112+ - ** All tests passing** : Comprehensive test coverage including new regex, JSON, and SQLite emulation tests
113+ - ** PHPStan Level 8** : Zero errors across entire codebase
114+ - ** PHP-CS-Fixer** : All code complies with PSR-12 standards
115+ - ** Full backward compatibility** : 100% maintained - all existing code continues to work
116+ - ** Code quality** : Follows KISS, SOLID, DRY, YAGNI principles
117+ - ** Documentation** : Updated with new features including regex helpers, JSON modification, savepoints, and plugin system
118+ - ** Examples** : All examples updated and verified on all dialects (MySQL, MariaDB, PostgreSQL, SQLite)
119+
11120## [ 2.9.2] - 2025-11-06
12121
13122### Added
@@ -1176,7 +1285,8 @@ Initial tagged release with basic PDO database abstraction functionality.
11761285
11771286---
11781287
1179- [Unreleased]: https://github.com/tommyknocker/pdo-database-class/compare/v2.9.2...HEAD
1288+ [Unreleased]: https://github.com/tommyknocker/pdo-database-class/compare/v2.9.3...HEAD
1289+ [2.9.3]: https://github.com/tommyknocker/pdo-database-class/compare/v2.9.2...v2.9.3
11801290[2.9.2]: https://github.com/tommyknocker/pdo-database-class/compare/v2.9.1...v2.9.2
11811291[2.9.1]: https://github.com/tommyknocker/pdo-database-class/compare/v2.9.0...v2.9.1
11821292[2.9.0]: https://github.com/tommyknocker/pdo-database-class/compare/v2.8.0...v2.9.0
0 commit comments