Docs of FromRow -> skip attribute updated as suggested by @abonander

Co-authored-by: Austin Bonander <austin.bonander@gmail.com>
This commit is contained in:
Gregor Giesen 2023-03-04 12:32:41 +01:00 committed by Austin Bonander
parent 6713e8cdaa
commit 70934d7cd2

View File

@ -147,20 +147,17 @@ use crate::row::Row;
/// }
/// ```
///
/// Given 2 querys
/// Then when querying into `User`, only `name` needs to be set:
///
/// ```sql
/// SELECT name FROM users;
/// ```rust,ignore
/// let user: User = sqlx::query_as("SELECT name FROM users")
/// .fetch_one(&mut some_connection)
/// .await?;
///
/// `Default` for `Vec<Address>` is an empty vector.
/// assert!(user.addresses.is_empty());
/// ```
///
/// and
///
/// ```sql
/// SELECT user_name, street, city addresses;
/// ```
///
/// the addresses can be assigned to the empty `addresses` field of each `User`.
///
/// ## Manual implementation
///
/// You can also implement the [`FromRow`] trait by hand. This can be useful if you