Summary

In this chapter, we have learned how to use object-relational mapping to store and load pure Rust types to databases. First, we created migrations with the diesel-cli tool that comes with the diesel crate. After that, we added models to map columns to Rust types and created a minimal connection using the r2d2 crate with a diesel crate abstraction.

We also touched on DSL constructs. however the diesel crate provides a lot of features, and if you want to construct more complex queries, you can refer to the documentation.

In the next chapter, we will learn about some frameworks that simplify writing microservices and let you implement your ideas faster.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.221.197.95