January 2019
Intermediate to advanced
520 pages
14h 32m
English
At the beginning of this chapter, we started an instance of the PostgreSQL database that we will use to check our tool. Compile the example we created with Cargo and print the available subcommands with the following command:
cargo run -- --helpYou will see the next output:USAGE: users [OPTIONS] <SUBCOMMAND>FLAGS: -h, --help Prints help information -V, --version Prints version informationOPTIONS: -d, --db <ADDR> Sets an address of db connectionSUBCOMMANDS: add add user to the table create create users table help Prints this message or the help of the given subcommand(s) list print list of users
Cargo looks like a cute tool for managing the database of an application. Let's create a table with it, like so:
cargo run -- ...
Read now
Unlock full access