Skip to content

Releases: rotexsoft/leanorm

Minor Release

07 Jun 23:50
Compare
Choose a tag to compare
  • 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.

Full Changelog: 4.1.0...4.1.1

Minor Release

07 Jun 23:47
Compare
Choose a tag to compare
  • 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.
  • Documentation Updates

  • All Model, Collection & record classes now explicitly implement \Stringable

Full Changelog: 4.0.1...4.0.2

Minor Release

07 Jun 23:41
Compare
Choose a tag to compare
  • 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.

Full Changelog: 3.0.2...3.0.3

Major Minor Release

07 Jun 23:36
Compare
Choose a tag to compare
  • 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.
  • 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

06 Jun 02:51
Compare
Choose a tag to compare
  • 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

15 Mar 18:15
Compare
Choose a tag to compare
  • Updated documentation
  • Updated dev depndencies

Full Changelog: 4.0.0...4.0.1

New Major Release

13 Mar 18:45
Compare
Choose a tag to compare
  • 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

04 Feb 01:42
Compare
Choose a tag to compare

Maintenance Release

13 May 04:08
Compare
Choose a tag to compare
  • 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

13 May 04:05
Compare
Choose a tag to compare
  • 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