Pomm 1.2 is on the launchpad

Posted 6 years ago.

9 months after the 1.1 release, the first release candidate of the 1.2 version is out. This kind of blog posts often mention that is has been a tough work to make this release to happen but, here, it is not the case. The main word of this release was "Keep It Stupid and Simple" and as such, time has been taken to ensure chosen solutions were the best fit.

Pomm now uses PHP's native Postgresql API

And this is a huge improvement ! The first thought is going to speed gain this change triggers. But this also makes the converters to be simplest and more efficient in addition of making the binary converter to fully support arrays.

Re-usable prepared statements

In past versions of Pomm, every time a query was made, it was prepared, run and destroyed. If the query was to be issued again, the process was iterated over and over. It is not the case anymore, every prepared statements are buffered in the Connection class ans re used if necessary. This also leads to a dramatic performance gain. Another difference from Pomm's previous versions is that you can use prepared statements directly by yourself.

Connections made configurable

It is now possible to SET Postgresql environment variables at connection's start. Default interval style and timestamp style are enforced this way using ISO8601 standard which makes the according converters to be faster and simpler. It is now a lot easier to code a converter associated with a special formatted type.

Escapable values

In previous versions of Pomm, it was not possible to save an object using Postgresql function to set some of its values. It is now possible to set escaped commands in entities values so they are interpreted in Postgresql :

<?php

$entity = $entity_map->createAndSaveObject(
array('data1' => new PommTypeEscape("my_schema.my_pg_function('something')")));

echo $entity['data1']; // the result of Postgresql function my_pg_function('something')

Code clean up

The connection filterchain has disappeared, so have the Collection and SimpleCollection classes replaced by a single Collection class. The Collection filters have been rewritten to a simpler implementation.