sad_spirit/pg_wrapper
This package has two parts and purposes
Converter of PostgreSQL data types to their PHP equivalents and back and
An object oriented wrapper around PHP’s native pgsql extension.
The converter part can be used separately, this will require manually specifying types and calling the type conversion methods. Using the wrapper part provides transparent conversion of query results and easier conversion of parameter values for parametrized queries.
Contents:
- Overview
- Tutorial: Converting Postgres types
- Classes for complex Postgres types
- Type converters
- Type converter factories
- Types supported out of the box
- Internals: Handling type OIDs
- How to map Postgres ENUM types to PHP enums
- How to add converters for new base types
- Tutorial: Working with database
- Setting up a database connection
- Executing queries
- Prepared statements
- Working with a query result
- Transactions
- Exception classes
- Adding functionality via decorators