danieloneill / nodedbi

LibDBI addon for Node.js
GNU General Public License v2.0
1 stars 1 forks source link

Improve doc #2

Open guimard opened 6 years ago

guimard commented 6 years ago

Hello, could you please update documentation to add for example:

Best regards, Xavier

danieloneill commented 6 years ago

I think the documentation is rather specific about it, since only the "type" is required or interpreted by the code, and any other options are specific to the DBI driver used.

For example if you click that link in that section of the documentation it'll take you to the libdbi drivers documentation page. From there if you click the driver you're interested in (I clicked HTML) and then Driver Options it will detail the parameters it accepts.

For testing a connection the method libdbi offers (ping) has been historically unreliable for me, and instead I've opted to simply handle query errors indicative of a lost connection by reconnecting and trying again.

I believe this is more the fault of the driver, or more specifically of libmysqlclient which I've used the majority of the time.

That said, I could easily implement it at the risk of offering false confidence to developers using this module if and when it doesn't respond as expected.

For now it's the best idea I can come up with. I'm very open to suggestions though, what do you think?

guimard commented 6 years ago

You could perhaps simply insert a link to http://libdbi-drivers.sourceforge.net/docs.html ?

danieloneill commented 6 years ago

I did actually, it's in that documentation in the correct section, but I agree it isn't as clear as it should be.