Releases: KnifeLemon/EasyQueryBuilder
Releases · KnifeLemon/EasyQueryBuilder
v1.0.2.3
Added
- BuilderRaw
__toString()method:BuilderRawobjects can now be cast to string automatically- Enables use in
implode(), string concatenation, and other string contexts - Returns the raw SQL expression value
- Enables use in
Full Changelog: v1.0.2.2...v1.0.2.3
v1.0.2.2
Added
- Alias parameter in table() method: The
table()static method now accepts an optional second parameter for table alias- Syntax:
Builder::table('users', 'u')sets table alias in one call - Simplifies initialization when table alias is known upfront
- Alternative to chaining
->alias()method
- Syntax:
Changed
Builder::table()method signature updated fromtable(string $table)totable(string $table, string $alias = '')
Full Changelog: v1.0.2.1...v1.0.2.2
v1.0.2.1
Added
- IS NULL and IS NOT NULL operator support: Use
['column' => ['IS', null]]and['column' => ['IS NOT', null]]in WHERE conditions- No parameter binding for NULL checks (correct SQL syntax)
- Works with both
where()andorWhere()methods
- Test coverage for IS NULL and IS NOT NULL operators (4 new tests)
- Enhanced README documentation with IS NULL/IS NOT NULL examples
Fixed
- IS NOT NULL operator now correctly generates
column IS NOT NULLinstead ofcolumn IS NOT ?with null parameter - Resolved issue where null values were incorrectly bound as parameters in IS/IS NOT operations
Full Changelog: v1.0.2...v1.0.2.1
v1.0.2
Added
- ON DUPLICATE KEY UPDATE support: Use
onDuplicateKeyUpdate()method to handle duplicate key errors gracefully in INSERT queries (MySQL/MariaDB)- Basic value updates:
->onDuplicateKeyUpdate(['column' => 'value']) - Increment values:
->onDuplicateKeyUpdate(['points' => Builder::raw('points + 100')]) - Use VALUES() function:
->onDuplicateKeyUpdate(['points' => Builder::raw('points + VALUES(points)')])
- Basic value updates:
- Test coverage for ON DUPLICATE KEY UPDATE functionality
Full Changelog: v1.0.1...v1.0.2
v1.0.1
- Add NOT IN operator support in where() and orWhere()
- Add raw SQL with parameter bindings: Builder::raw('expr', [bindings])
- Add Builder::safeIdentifier() for validating user-provided column names
- Add Builder::rawSafe() for safe raw expressions with user input
- Add BuilderRaw::withIdentifiers() for multiple safe identifier substitution
- Update SECURITY.md with new security features and correct class names
- Update README.md and QUICKSTART.md with new feature documentation
- Add comprehensive tests (62 tests, 129 assertions)
Full Changelog: v1.0.0...v1.0.1