A package for interfacing with a PostgreSQL database.
MIT License
This package aims to act as your object-relational-map (ORM) to a PostgreSQL database.
To use this package, we recommend you create two class files for each of your
tables. One should end in the word Table
and represent operations on the
table itself. This should ideally extend the AbstractTable
in the package.
If you need to create something rather special, then one can just implement
the TableInterface
interface. Once you have extended the class, all you have
to do is fill in all of the abstract methods.
The second class you need to create is for a row/object of the table. This
class should extend the AbstractTableRowObject
. Again, just fill in all of
the abstract methods for the package to be able to manage your tables.
This package only works with tables that have an id
column of type uuid
.
If you wish to create some changes and run the tests, simply fill in you
PostgreSQL host details into the /testing/settings.php.tmpl
file and rename
it to /testing/settings.php
.
Then run the tests with:
php testing/main.php