January 2019
Intermediate to advanced
520 pages
14h 32m
English
In the previous section, we used a connecting pool from the r2d2 crate with a PostgreSQL database. There is also a connection manager for MySQL in the r2d2-mysql crate that allows you to use a MySQL connection with the r2d2 crate. The r2d2-mysql crate is based on the mysql crate. Using the pool is also simple, just as we did for the PostgreSQL database, but here, we use the MysqlConnectionManager as a type parameter for r2d2::Pool. Let's modify all functions with queries to use a pool from our MySQL database.
Read now
Unlock full access