From d7277f41ebcaab1072da74efc163b40b47ce63be Mon Sep 17 00:00:00 2001 From: Austin Bonander Date: Fri, 15 Jul 2022 13:06:37 -0700 Subject: [PATCH] docs: clarify relationship between `query_as!` and `FromRow` (#1977) --- src/macros.rs | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/src/macros.rs b/src/macros.rs index 0ca85d61..aa6d02c6 100644 --- a/src/macros.rs +++ b/src/macros.rs @@ -399,10 +399,13 @@ macro_rules! query_file_unchecked ( /// /// This lets you return the struct from a function or add your own trait implementations. /// -/// **No trait implementations are required**; the macro maps rows using a struct literal -/// where the names of columns in the query are expected to be the same as the fields of the struct -/// (but the order does not need to be the same). The types of the columns are based on the -/// query and not the corresponding fields of the struct, so this is type-safe as well. +/// **This macro does not use [`FromRow`][crate::FromRow]**; in fact, no trait implementations are +/// required at all, though this may change in future versions. +/// +/// The macro maps rows using a struct literal where the names of columns in the query are expected +/// to be the same as the fields of the struct (but the order does not need to be the same). +/// The types of the columns are based on the query and not the corresponding fields of the struct, +/// so this is type-safe as well. /// /// This enforces a few things: /// * The query must output at least one column.