This repository has been archived on 2024-07-25. You can view files and clone it, but cannot push or open issues or pull requests.
ood_persistence/examples/README.md
2021-10-21 01:18:14 +03:00

559 B

Examples

By default, all examples in this directory require a postgres server, which you can run using docker-compose.dev.yml in the examples/web directory.

Simple

This example initializes persistence, gets a connection and runs the query.

cargo run --example simple --features r2d2_postgres

Transaction

This is extended simple example where we also upgrade existing connection to transaction and run query. Then we close transaction and use connection.

cargo run --example transaction --features "nightly r2d2_postgres"