January 2019
Intermediate to advanced
520 pages
14h 32m
English
The tool we created uses a single connection to a database. It works fine for a small amount of queries. If you want to run multiple queries in parallel, you'll have to use connection pools. In this section, we improve the tool with the import command, which imports bulk user data from a CSV file. We will use a Pool type from the r2d2 crate, add a command that will read users from a file, and execute statements to add users to a table in parallel.
Read now
Unlock full access