static transact(options, context) {
        if (typeof options.transact === 'function') {
            try {
                options.transact(context);
            } catch (e) {
                // silencing the error, to avoid breaking the transaction;
                Events.unexpected('transact', e);
            }
        }
    }
@event transact
@description
Global notification of a transaction start / finish events, as executed via {@link Database#tx Database.tx}
or {@link Database#txIf Database.txIf}.

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

@param {EventContext} e
Event Context Object.

@example

const initOptions = {

    // pg-promise initialization options...

    transact(e) {
        if (e.ctx.finish) {
            // this is a transaction->finish event;
            console.log('Duration:', e.ctx.duration);
            if (e.ctx.success) {
                // e.ctx.result = resolved data;
            } else {
                // e.ctx.result = error/rejection reason;
            }
        } else {
            // this is a transaction->start event;
            console.log('Start Time:', e.ctx.start);
        }
    }
};