wilton/PGConnection
Connect to PostgreSQL database.
More...
Functions | |
Object | PGConnection (String url, Function|Undefined callback) |
Open connection to database. |
This module allows to work with PostgreSQL database.
It implements a lightweight ORM - object-relational mapping, allows to map JavaScript objects to query parameters and to map query results to JavaScript objects.
Postgres connection can be closed manually to release system resource, otherwise it will be closed during the shutdown.
Usage example:
Object PGConnection::PGConnection | ( | String | url, |
Function|Undefined | callback | ||
) |
Opens connection to database.
url | String backend-specific connection URL, example: postgresql://host=127.0.0.1 port=5432 dbname=test user=test password=test , |
callback | Function|Undefined callback to receive result or error |
Object
pgsql
instance