diff --git a/sqlx-macros-core/src/derives/attributes.rs b/sqlx-macros-core/src/derives/attributes.rs index bf3c126c..bfbc32f6 100644 --- a/sqlx-macros-core/src/derives/attributes.rs +++ b/sqlx-macros-core/src/derives/attributes.rs @@ -63,6 +63,7 @@ pub struct SqlxChildAttributes { pub default: bool, pub flatten: bool, pub try_from: Option, + pub skip: bool, } pub fn parse_container_attributes(input: &[Attribute]) -> syn::Result { @@ -155,6 +156,7 @@ pub fn parse_child_attributes(input: &[Attribute]) -> syn::Result syn::Result try_set!(try_from, val.parse()?, value), Meta::Path(path) if path.is_ident("default") => default = true, Meta::Path(path) if path.is_ident("flatten") => flatten = true, + Meta::Path(path) if path.is_ident("skip") => skip = true, u => fail!(u, "unexpected attribute"), }, u => fail!(u, "unexpected attribute"), @@ -190,6 +193,7 @@ pub fn parse_child_attributes(input: &[Attribute]) -> syn::Result { predicates.push(parse_quote!(#ty: ::sqlx::FromRow<#lifetime, R>));