index.js
function OpenConnection(connection) {
    let base = new pg.Client({
        host: connection.Hostname || 'localhost',
        port: parseInt(connection.Port) || 5432,
        user: connection.Username,
        password: connection.Password,
        database: connection.Database
    });
    base.connect();
    return new PostgreSQL(base);
}
function OpenConnection(connection) {
    let base = new pg.Client({
        host: connection.Hostname || 'localhost',
        port: parseInt(connection.Port) || 5432,
        user: connection.Username,
        password: connection.Password,
        database: connection.Database
    });
    base.connect();
    return new PostgreSQL(base);
}
function OpenConnection ( connection ) { let base = new pg . Client ( { host : connection . Hostname || 'localhost' , port : parseInt ( connection . Port ) || 5432 , user : connection . Username , password : connection . Password , database : connection . Database } ) ; base . connect ( ) ; return new PostgreSQL ( base ) ; }
Opens a connection
@param {{Hostname: string, Port: number, Username: string, Password: string, Database: string}} connection
@returns {PostgreSQL}
Opens a connection