Closed lchelmickiolx closed 1 year ago
Hi @lchelmickiolx
How about passing the connection pool like this:
conn := stdlib.OpenDB(*config, OptionOpenDB...)
postgres.New(postgres.Config{
Conn: conn,
})
The change seems to bind the current driver into the GORM driver too much, we doesn't want to do that, thank you for your unerstanding.
What did this pull request do?
It gives the possibility to define
BeforeConnect
andAfterConnect
on stdlib connection.User Case Description
Generate an IAM Auth password for RDS just before a new connection is opened. Tokens are valid for only 15 minutes, so after w while they have to be regenerated, for the pool to be able to open new connections