sanpii / libpq.rs

Rust safe binding for libpq

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Possible to add examples, docs, benches?

bionicles opened this issue · comments

Hi @sanpii this seems like a cool crate to potentially sidestep a lot of complexity, however it doesn't seem accessible, would it be possible to make some examples of how to use this, perhaps some docs (usually, quickstart, usage examples, deep dive, faq/troubleshoot are nice sections for docs) ?

Just saying, this could become a more direct and easy path to use PostgreSQL (a tremendously popular database) and thus make this a tremendously popular crate, but imho any developer library succeeds or fails on documentation, can please write guidance on how you like us to use your crate? otherwise we have to dig into tests, it's possible for that to work sometimes but not the best experience / signal to noise ratio of tests can be high and the rustdoc seems decent but also that's more of an API reference and not a quick-start guide with code examples

One easy gain would be to add a guide to run the tests, i tried running them and it says no password supplied but doesn't suggest how to pass the password, i'm assuming environment variables, what's the name of your password environment variable ? PQ_DSN sounds like it holds more than just a password, nothing on google, could you please help update the docs to make it easier for prospective contributors to get the crate tests passing?

links which helped me

fn exec_params() {
looks like a test of parametric querying

https://github.com/sanpii/libpq.rs/blob/2cc3094cdb5bf40e4ef17eeaaf10a3c59ca701fd/.gitlab-ci.yml#L24C1-L25C1 might have details for how to develop this (could be good to move some of these into a Makefile)

thanks for making this crate, looks like you did a lot, let's make sure people can use it

Hello,

I’m agree this crate lacks documentation, because it’s mainly written for me.

But I don’t sure it’s a good way to deal with postgresql. For me, we need a higher level crate like elephantry or diesel.

I put here libpq examples could be rewritten in rust: https://www.postgresql.org/docs/current/libpq-example.html