holdfenytolvaj / pogi

Javascript library for PostgreSQL and node.js
MIT License
140 stars 15 forks source link

'max' option is missing from ConnectionOptions #4

Closed gergely-ujvari closed 7 years ago

gergely-ujvari commented 7 years ago

Hi! This library looks cool.

I'm just trying to use it for the first time, and according to the documentation (see here: https://pogi.readthedocs.io/en/latest/connection/ ) you can set the max property in the connection options, which looks like the max number of clients in the connection pool, however this max property is not present in the ConnectionOptions interface (neither in the linked document nor in the Connections options interface definition here: https://github.com/holdfenytolvaj/pogi/blob/2fc99850f0aeb90061968736ae31ca2a383190bc/lib/pgDb.d.ts#L20 )

And of course, my ts compiler complains about this. Is this missing by purpose?

holdfenytolvaj commented 7 years ago

Apparently I've copied the settings over from https://github.com/brianc/node-postgres/blob/f6c40b9331c90d794d5fcbb1d4ae2f28eabd4d42/lib/defaults.js where there is no default for it. But min/max are valid parameters nevertheless. I will add them today. Thanks for finding it and please do report everything you find or could be done better!

holdfenytolvaj commented 7 years ago

Done!

gergely-ujvari commented 7 years ago

Cool, thank you very much!