Releases: stndrs/pgl
v1.1.0
This release introduces automatic connection management. The Connection type can now be a Pool or a single Connection. Passing a Connection to pgl.query, pgl.execute, pgl.batch, pgl.transaction, and pgl.savepoint will take care of checking out and checking in single connections as needed.
This change in behaviour means using pgl.begin/commit/rollback directly is slightly different and introduces some risks around connection management. Calling pgl.begin will check out a connection and begin a transaction, but that connection will not be checked back in until pgl.commit or pgl.rollback are called when the transaction ends. Using these functions makes it easier to check out connections for long periods of time which should be avoided. Callers should prefer to use pgl.transaction. begin/commit may be deprecated and eventually removed in future releases if they don't provide any tangible benefit.
pgl.release_savepoint was also deprecated and will be removed in a future release as it serves no real purpose.
The changes in this release were made to be backwards compatible with the existing public API. The API will be cleaned up and streamlined with the next major version release.