January 2019
Intermediate to advanced
520 pages
14h 32m
English
In this section, we will learn how to transform data relations into ORM models. We will implement a database interaction crate for a chat application. Imagine, we need to express these data relations in Rust:

We have four tables. The first table contains users. It's the main table and is used by all the other tables. Every user can create a channel and become the owner of a channel. The second table contains channels, and every channel has the owner represented by a record in the users table.
In our chat application, every user can join a channel and post messages to it. To maintain this relation, ...
Read now
Unlock full access