Skip to content
Alexey Borzov edited this page Sep 6, 2017 · 6 revisions

sad_spirit\pg_wrapper

This package is not a DB abstraction layer even though it may look similar (and draw some inspiration from projects like PEAR::MDB2 and Doctrine::DBAL). Its goal is to leverage PostgreSQL's strengths in PHP projects rather than assist with building RDBMS-agnostic applications.

One of such strengths is a rich and extensible data type system, so pg_wrapper allows to

  • Easily build string representations for query parameters,
  • Automatically convert query result columns from string representations to native PHP types,
  • Add custom converters for custom and ad-hoc types.

It also contains classes representing PostgreSQL's complex types (geometric, ranges, etc.)

Basic usage

Main classes and interfaces