[][src]Module limiting_factor::database

This module handles a database layer, mainly intended to be used with a web server or framework like Rocket or Iron.

It leverages diesel and r2d2.

Most code comes from the Rocket manual: https://rocket.rs/guide/state/#databases

Structs

DatabaseConnection

Represents an established working database connection from the pool

Functions

initialize_database_pool

Builds a r2d2 database pool, to be used in a request guard or a managed state.

test_database_connection

Allows to test if it's possible to establish a connection to the database.

Type Definitions

PostgreSQLPool