static connect(ctx, client, useCount) {
        if (typeof ctx.options.connect === 'function') {
            try {
                ctx.options.connect({client, dc: ctx.dc, useCount});
            } catch (e) {
                // have to silence errors here;
                // cannot allow unhandled errors while connecting to the database,
                // as it will break the connection logic;
                Events.unexpected('connect', e);
            }
        }
    }
@event connect
@description
Global notification of acquiring a new database connection from the connection pool, i.e. a virtual connection.

However, for direct calls to method {@link Database#connect Database.connect} with parameter `{direct: true}`,
this event represents a physical connection.

The library will suppress any error thrown by the handler and write it into the console.

@param {{}} e Event Properties

@param {external:Client} e.client
$[pg.Client] object that represents the connection.

@param {*} e.dc
Database Context that was used when creating the database object (see {@link Database}).

@param {number} e.useCount
Number of times the connection has been previously used, starting with 0, for a freshly
allocated physical connection.

This parameter is always 0 for direct connections (created by calling {@link Database#connect Database.connect}
with parameter `{direct: true}`).

@example

const initOptions = {

    // pg-promise initialization options...

    connect(e) {
        const cp = e.client.connectionParameters;
        console.log('Connected to database:', cp.database);
    }

};