ood_persistence/examples
Dmitriy Pleshevskiy 58269f5a64 chore: rename error type and reexport error types
Closes #2
2021-10-21 23:56:47 +03:00
..
web chore: rename error type and reexport error types 2021-10-21 23:56:47 +03:00
README.md chore: add simple examples 2021-10-21 01:18:14 +03:00
simple.rs chore: add simple examples 2021-10-21 01:18:14 +03:00
transaction.rs chore: add simple examples 2021-10-21 01:18:14 +03:00

README.md

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"