forrest79 / phpgsql

Simple and fast PHP database library for PostgreSQL with auto converting DB types to PHP and fluent interface for SQL query writing.
Other
11 stars 3 forks source link

PhPgSql

Latest Stable Version Monthly Downloads License Build codecov

Simple and fast PHP database library for PostgreSQL with auto converting DB types to PHP and a powerful fluent interface that can be used to simply create the most of SQL queries.

DB and fluent part can be used separately.

Examples of how to use this library in application, how to extend it with some useful methods and a simple repository system can be found here https://github.com/forrest79/phpgsql-extension-repository-example.

Installation

The recommended way to install PhPgSql is through Composer:

composer require forrest79/phpgsql

PhPgSql requires PHP 8.1.0 and pgsql binary extension. It doesn't work with the PDO!

If you're using PHPStan you can install settings for this great tool.

composer require --dev forrest79/phpgsql-phpstan

And if you're using Nette framework, there is existing integration with the Tracy panel.

Documentation

Complete documentation is in the docs directory.

All examples are self-tested - you can be sure, it's working.