January 2019
Intermediate to advanced
520 pages
14h 32m
English
In the previous example of data insertion, we didn't use the generated users type, and used the table nested type only. To list users in the implementation of the list subcommand, we will use types from the dsl submodule.
If you build some documentation and look into the users::schema::users::dsl module, you will see the following items:
pub use super::columns::id;pub use super::columns::name;pub use super::columns::email;pub use super::table as users;
All types are quite complex, and you can see all the features in the documentation. Since the users table type implements the AsQuery trait, we can use the load method of the RunQueryDsl trait for the users type. We set the associated type to model::Users ...
Read now
Unlock full access