Skip to content

Releases: atlasphp/Atlas.Table

1.4.0

07 Sep 14:45

Choose a tag to compare

The methods Table::updateRowPerform() and deleteRowPerform() now throw an
exception when the table does not have a primary key.

Also updated docs.

1.3.0

10 Mar 15:23

Choose a tag to compare

This release implements IteratorAggregate on Row objects so you can foreach()
over their columns.

Also, Row::isModified() now booleans compares as integers, so that a change
from 1 => true or 0 => false (and vice versa) is no longer considered a
difference. This should help reduce "Expected 1 row affected, actual 0" errors
with some databases (notably MySQL).

1.2.0

12 Aug 20:46

Choose a tag to compare

This release adds automatic identifier quoting for the FROM/INTO table name (via
Table::select(), insert(), update(), and delete()) as well as automatic
identifier quoting for primary key column names (via Table::fetchRow() and
fetchRows()).

Updated docs and tests accordingly.

1.1.0

03 Aug 18:05

Choose a tag to compare

Added method TableLocator::getConnectionLocator().

1.0.2

13 Jul 21:31

Choose a tag to compare

Moves the check to see if a column exists from Table::newRow() to Row::__construct().

Row::__construct() now calls Row::assertValidValue() on column value inputs.

1.0.1

12 Jul 21:12

Choose a tag to compare

This release incorporates some documentation fixes and an added benchmarking
script at tests/bench.php.

1.0.0

07 Jul 20:36

Choose a tag to compare

First stable release.

1.0.0-beta4

03 Jul 13:42

Choose a tag to compare

1.0.0-beta4 Pre-release
Pre-release

TableEvent::beforeInsertRow() now returns ?array instead of void. The
returned array will be used for the insert values; this allows consumers to
explicitly control which values will be inserted, and to validate the values
early on. (If a null is returned, the insert will use $row->getArrayCopy().)

Likewise, TableEvent::beforeUpdateRow() now returns ?array instead of void.
The returned array will be used for the update values; this allows consumers to
explicitly control which values will be updated, and to validate the values
early on. (If a null is returned, the update will use $row->getArrayDiff().)

These are both BC breaks for implementors of TableEvents::beforeInsertRow() and
beforeUpdateRow().

1.0.0-beta3

03 Jun 14:17

Choose a tag to compare

1.0.0-beta3 Pre-release
Pre-release

Added methods Table::selectRow() and selectRows() so you can pass in an
externally-constructed Select object to fetch rows by primary key; this is
useful with, e.g., MapperSelect queries modified by their own events.

1.0.0-beta2

24 May 12:24

Choose a tag to compare

1.0.0-beta2 Pre-release
Pre-release

This release introduces one BC-breaking change from beta1: the TableEvents
methods have been renamed from (before|modify|after)(Insert|Update|Delete) to
append the word Row. For example, TableEvents::beforeUpate() is now
TableEvents::beforeUpdateRow(). If you have implemented these methods in your
custom TableEvents classes, you will need to change to the new names; the
signatures and logic remain otherwise identical. There is no effect on generated
classes.

There are new modify(Insert|Update|Delete) TableEvents methods that now apply
to insert(), update(), and delete() respectively. These allow you a chance to
modify the table-wide operation before working with the query object directly.

This release also adds a PHPStorm metadata resource, and updates the docs.