Is there an existing issue that is already proposing this?
[X] I have searched the existing issues
Is your feature request related to a problem? Please describe it
missing option(s) to hook into the connection error/succsess
Describe the solution you'd like
amongst the already options such as "username" "port", "password" etc...
2 addition options should be added "connect" and "error" (names are up for debate)
a example of how this look like would be simular to this
What is the motivation / use case for changing the behavior?
people might want to do certain operations when connected or when there is a error
from simple logs to automation who knows what people will use it for
Is there an existing issue that is already proposing this?
Is your feature request related to a problem? Please describe it
missing option(s) to hook into the connection error/succsess
Describe the solution you'd like
amongst the already options such as "username" "port", "password" etc... 2 addition options should be added "connect" and "error" (names are up for debate) a example of how this look like would be simular to this
Teachability, documentation, adoption, migration strategy
altough typeorm does not have such a event/hook work arounds can be done on the "createConnection" https://github.com/nestjs/typeorm/blob/master/lib/typeorm-core.module.ts#L210 such as try/catching the DataSource before returning it or something of this nature
What is the motivation / use case for changing the behavior?
people might want to do certain operations when connected or when there is a error from simple logs to automation who knows what people will use it for