Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Possible to add examples, docs, benches? #44

Open
bionicles opened this issue Apr 9, 2024 · 4 comments
Open

Possible to add examples, docs, benches? #44

bionicles opened this issue Apr 9, 2024 · 4 comments

Comments

@bionicles
Copy link

bionicles commented Apr 9, 2024

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

@bionicles
Copy link
Author

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?

@bionicles
Copy link
Author

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

@sanpii
Copy link
Owner

sanpii commented Apr 9, 2024

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

@sanpii
Copy link
Owner

sanpii commented Apr 10, 2024

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants