Skip to content

Releases: rotexsoft/leanorm

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

New Major Release

09 May 04:38
Compare
Choose a tag to compare
  • Updated the aura/sqlquery dependency to the latest version 3.0.0+
  • Deprecated Utils::search2D(...) in 2.X has been removed in this version
  • Apart from the two changes above, I will strive to maintain the same features across the latest 2.X & 3.X version
  • The next version 4.X will have a minimum requirement of PHP 8.1. 2.X & 3.X both require a minimum of PHP 7.4

Full Changelog: 2.2.4...3.0.0

Performance Improvements

28 Feb 00:11
Compare
Choose a tag to compare
  • More improvement of algorithm for stitching eager fetched related data into parent records.

Full Changelog: 2.2.3...2.2.4

Performance Improvements

25 Feb 12:11
Compare
Choose a tag to compare
  • Improved algorithm for stitching eager fetched related data into parent records.

  • If the table_cols array is pre-populated with a table / view column meta data array in a Model class, the Model constructor will no longer query the info schema for table column metadata, thereby reducing the number of run time sql queries. It is up to the developer to make sure future modifications to the table / view columns are reflected in the hard-coded array in the appropriate Model classes.

  • Deprecated Utils::search2D as it's no longer used anywhere in the package, will be removed in version 3.0.0

Full Changelog: 2.2.2...2.2.3