Skip to content

Releases: KnifeLemon/EasyQueryBuilder

v1.0.2.3

17 Mar 16:46

Choose a tag to compare

Added

  • BuilderRaw __toString() method: BuilderRaw objects can now be cast to string automatically
    • Enables use in implode(), string concatenation, and other string contexts
    • Returns the raw SQL expression value

Full Changelog: v1.0.2.2...v1.0.2.3

v1.0.2.2

19 Feb 04:43

Choose a tag to compare

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

Changed

  • Builder::table() method signature updated from table(string $table) to table(string $table, string $alias = '')

Full Changelog: v1.0.2.1...v1.0.2.2

v1.0.2.1

05 Feb 07:58

Choose a tag to compare

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() and orWhere() 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 NULL instead of column 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

04 Feb 09:05

Choose a tag to compare

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)')])
  • Test coverage for ON DUPLICATE KEY UPDATE functionality

Full Changelog: v1.0.1...v1.0.2

v1.0.1

20 Jan 12:59

Choose a tag to compare

  • 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