Mikael Lepistö

Results 133 comments of Mikael Lepistö

I actually don't like or understand why there even is `expirationChecker` attribute in connection. To me would be better if `connection` could be declared as a function which then may...

> I can't tell for every case but at least in my case, this property expirationChecker would be very handy because I need to get new credentials for the database...

> I'm sorry but I don't understand what you mean by "reloading the config if it's changed". I mean something like this: ``` let config = {}; setInterval(() => {...

> Anyway, I'll try something around that example you've showed. I don't think that my example will work at all, since it is an imaginary API how I would have...

Maybe... more people should read through those connection parts of the code base to make sure that it is a valid solution... I don't know when I would have time...

@sprusr I don't like that expiration checker way of implementing it. It is really limited and seems hacky. Just allowing that the configuration is a callback function returning configuration object...

> Knex, people are doing quite heavy lifting in that async connection function, expecting it to be called very rarely or even only once. In that respect this could be...

> The reason I think the better choice here for solving this use-case is the expirationChecker is because it's already there, recommended in documentation, Right. Yeah now I get it...

This is not supported. If you want to use connect string you should do ``` (async () => { const knex = Knex({ client: "postgres", connection: "postgres://jonhdoe:[email protected]:5432/foo" }); console.log({ ...(await...

Check CONTRIBUTING.md inheriting new dialect from current pg dialect using different driver should be easy and can be released as a separate npm package.