Minor Release
- Updated the logic for calculating number of deleted records in deleteMatchingDbTableRows(array $cols_n_vals): int in the Model class
- Now using a select count(*) with the same where conditions as the delete statement to get the count of matching values before and after executing the delete statement and then returning the difference of these values
- The old method relied on PDOStatement::rowCount() which seems to have different behaviors for Sqlite & PostgreSQL under certain conditions
- see https://www.php.net/manual/en/pdostatement.rowcount.php
- public PDOStatement::rowCount(): int
- This method returns "0" (zero) with the SQLite driver at all times, and with the PostgreSQL driver only when setting the PDO::ATTR_CURSOR statement attribute to PDO::CURSOR_SCROLL.
- public PDOStatement::rowCount(): int
- see https://www.php.net/manual/en/pdostatement.rowcount.php
Full Changelog: 3.0.2...3.0.3