Expand description
Components represent data backed by rows in the database
Given a table foos
:
id | text | flag |
---|---|---|
1 | test | f |
2 | example | f |
4 | hello | t |
A request for SELECT * FROM foos
would return:
[
{ id: 1, text: "test", flag: false }
{ id: 2, text: "example", flag: false }
{ id: 4, text: "hello", flag: true }
]
TODO: Explain ToRow
and FromRow
here.
Structs§
Traits§
- Primary
Key - A way to identify components by themselves
- Sqlx
Component - Rows in the database represent a spesifc
Component
- ToRow
- A record that can be upserted into the database