Connection events
See original GitHub issueFeature request
It would be great to have some way to monitor connection events for reporting purposes and to setup defaults for the connection. For example, in Node I would run:
dbPool.on("connect", (client: PoolClient) => {
if (ENV.TEST) {
// Prefer indexes even on small tables. This disables optimizations in PostgreSQL that
// prefers scanning small tables, thus changing how EXPLAIN works between test and prod environments.
// @see: https://www.postgresql.org/docs/9.4/static/runtime-config-query.html#GUC-ENABLE-SEQSCAN
client.query(`SET enable_seqscan = OFF;`);
}
});
I don’t see a similar way to do this in the Deno driver.
Issue Analytics
- State:
- Created 3 years ago
- Comments:5 (1 by maintainers)
Top Results From Across the Web
Connection Events – Organizer of International Business ...
Connection Events designs services and solutions for professionals in the videogame and the visual effects industries. OUR EVENTS ...
Read more >Connection Events - LinkedIn
Connection Events creates opportunities for international development and is supported by a network of high-profile market players from every segment of the ...
Read more >Connection Events - ADO.NET - Microsoft Learn
NET Framework data providers have Connection objects with two events that you can use to retrieve informational messages from a data source ...
Read more >Responding to Connection Events - IBM
These events include information about new and existing connections to a structure (including failed-persistent connections), operations to rebuild a structure, ...
Read more >AWS::Events::Connection - AWS CloudFormation
Creates a connection. A connection defines the authorization type and credentials to use for authorization with an API destination HTTP endpoint.
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

I’m not to keen to integrate uncontrollable async behaviour such as the EventEmitter style you are proposing
I find @ebebbington solution much more reliable for the current use case, and could be roughly translated to the following
Closing due to inactivity