maharder/postgresql-orm

1.0.0 2022-05-13 17:11 UTC

This package is auto-updated.

Last update: 2024-09-13 22:04:03 UTC


README

PHP VersionGitHub code size in bytesGitHub release (latest by date)

PostgreSQL ORM Class

I was looking for a class that works with postgres but doesn't required to create and manage models. Only for transactions.

This class uses the PHP PDO connection, so you have to enable pdo_pgsql in your php.ini. While I was writing this class I used PHP version 7.2. I recommend this version or a higher one.

It was my first commit to packagist so if some issues are encountered please let me know.

Documentation

Namespaces

MaHarder

Classes

Usage

$postgresql = new PostgreSQL('database', 'user', 'password', 'localhost', 5432);

Standalone

Download latest release and extract it.

Either you include it with include_once (__DIR__ . '/classes/PostgreSQL.php); or call a use for it use MaHarder\classes\PostgreSQL;

If you change the paths, so use the include

Composer

Run

composer require maharder/postgresql-orm

Now you can use the class