Skip to content

Latest commit

 

History

History
48 lines (36 loc) · 2.01 KB

File metadata and controls

48 lines (36 loc) · 2.01 KB

Changelog

[2.2.3] - 2026-08-16

Added

  • SUM() aggregate function for SELECT queries, with optional alias and GROUP BY support
  • DB::hasTable(<tableName>) method for checking whether a table exists

Internal

  • Added sum() to SelectInterface and hasTable() to TableInterface
  • hasTable() resolves against information_schema.TABLES with the database and table name bound as parameters, scoped by TABLE_SCHEMA and matched exactly, so prefixes containing _ cannot produce false positives
  • hasTable() supports both the pdo and wpdb drivers
  • Added feature tests for SUM with and without GROUP BY, and for hasTable() against existing, missing, dropped, truncated, and invalid-wildcard table names

[2.2.1] - 2026-03-04

Added

  • DB::truncate(<tableName>) method for clearing all data from a table

Fixed

  • wpdb driver failing on DELETE without WHERE clause
  • Exception handler printing HTML in CLI/terminal environments

Internal

  • Consolidated Statement\Drop into Statement\Table class for better extensibility
  • Added TableInterface for consistent table operation API
  • Renamed QueryFactory::dropQuery() to tableQuery()
  • Added feature tests for truncate, drop, dropIfExists, delete-all, and update-all
  • Added wpdb driver test coverage for delete and update operations

[2.2.0] - 2026-02-18

Added

  • AVG(), MIN(), MAX() aggregate functions for SELECT queries
  • SQL operator validation via IdentifierValidator::validateOperator()
  • INSERT...SELECT support with aggregate functions

Changed

  • All WHERE methods now validate operators against a strict whitelist

Internal

  • Extracted WHERE clause logic into dedicated WhereClause trait
  • Extracted JOIN clause logic into dedicated JoinClause trait
  • Renamed src/Expression/ to src/Clause/
  • Added WhereClauseInterface for consistent WHERE API across statements
  • Added addAggregate() shared helper for aggregate function building
  • Comprehensive test coverage for aggregates and operator validation