Skip to content

Releases: sad-spirit/pg-gateway

Release 0.4.0 - reduce boilerplate

31 Aug 15:48
Compare
Choose a tag to compare

Instead of

$locator->createGateway('messages')
    ->select(
        $locator->createBuilder('messages')
            ->outputColumns(fn(ColumnsBuilder $cb) => $cb->primaryKey())
            ->orderBy('added desc')
            ->limit(1)
    )
    ->getIterator()
    ->current()

it is now possible to write

$locator->select('messages', fn(FluentBuilder $builder) => $builder
    ->outputColumns()
         ->primaryKey()
    ->orderBy('added desc')
    ->limit(1))
    ->fetchFirst()

Release 0.3.0 - simplify custom metadata

06 Aug 18:54
Compare
Choose a tag to compare

Implementations of methods defined in metadata\Columns, metadata\PrimaryKey, and metadata\References interfaces were moved from metadata\Table* classes into traits. This separates the code that loads metadata from DB / cache and the code that accesses that metadata, allowing reuse of the latter.

Release 0.2.1 - composer name fix

24 Jul 12:13
Compare
Choose a tag to compare

Package name in composer.json was changed from sad_spirit/pg-gateway to the intended sad_spirit/pg_gateway (dash to underscore)

Release 0.2.0 - API refinement

14 Jun 19:06
Compare
Choose a tag to compare
  • Reworked metadata classes to make it possible to create gateways to relations that are not ordinary tables (views, foreign tables...)
  • TableGateway no longer extends TableDefinition, instances of TableGateway are now configured with instances of TableDefinition
  • Extracted builder methods from GenericTableGateway to a new FluentBuilder class. Builders are created by a new TableLocator::createBuilder() method backed by implementations of TableGatewayFactory.
  • Added NameMappingGatewayFactory implementation of TableGatewayFactory that maps table names to class names.
  • Added fragments and builder methods that populate the WITH clause.

Initial release

13 Sep 05:48
Compare
Choose a tag to compare

While version is only 0.1.0, the previous variant of this code was used in production for a few years.