Releases: rotexsoft/leanorm
Releases · rotexsoft/leanorm
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: 4.1.0...4.1.1
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
-
Documentation Updates
-
All Model, Collection & record classes now explicitly implement \Stringable
Full Changelog: 4.0.1...4.0.2
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
Major 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
-
ReadOnlyRecord
- protected function throwNotSupportedException($function_name): void
- is now
- protected function throwNotSupportedException(string $function_name): void
-
Documentation updates
Full Changelog: 2.2.5...2.3.0
Major Minor Release
- Documentation updates
- All queries generated by LeanOrm now strictly use named parameters / place-holders, which means all users of this library must use named parameters / place-holders in all their queries as PDO does not allow mixing and matching named parameters / place-holders & question-mark place-holders
- The Model, Collection & Record classes now explicitly implement \Stringable
Full Changelog: 4.0.1...4.1.0
Minor Release
- Updated documentation
- Updated dev depndencies
Full Changelog: 4.0.0...4.0.1
New Major Release
- Bumped min PHP version to PHP 8.1
- Now using version 3.0+ of rotexsoft/gdao which is more strictly typed
- Switched from aura/sqlschema to rotexsoft/sqlschema
- Now using psr/log ^2.0.0 || ^3.0.0
- Added ./run-tests-against-multiple-db-versions.php, a script for testing the package against multiple versions of MariaDB, MySQL & Postgres
- Added more strict typing across the code base
- Moved all exception classes to an Exceptions sub-folder & they are all in the \LeanOrm\Exceptions namespace
- No longer using atlas/info for fetching db meta-data
- Most methods that return self now return static
- removeRecord(\GDAO\Model\RecordInterface $record): static has been added to the Collection class
Full Changelog: 3.0.2...4.0.0
Under the hood optimizations
Full Changelog: 3.0.1...3.0.2
Maintenance Release
- Added
- \LeanOrm\Model::fetchOneByPkey($id, array $relations_to_include = []): ?\GDAO\Model\RecordInterface
- and \LeanOrm\Model\Collection::getData(): array
Full Changelog: 3.0.0...3.0.1
Maintenance Release
- Added
- \LeanOrm\Model::fetchOneByPkey($id, array $relations_to_include = []): ?\GDAO\Model\RecordInterface
- and \LeanOrm\Model\Collection::getData(): array
Full Changelog: 2.2.4...2.2.5