Expand Index struct to also get the original field name

This is needed in postgres, since we store data as jsonb so struct
fields can't get renamed

Signed-off-by: Lee Smet <lee.smet@hotmail.com>
This commit is contained in:
Lee Smet
2025-07-31 12:08:22 +02:00
parent de8ca02048
commit 0a8c5d1c1f
3 changed files with 15 additions and 0 deletions

View File

@@ -169,6 +169,10 @@ pub fn model(_attr: TokenStream, item: TokenStream) -> TokenStream {
fn key() -> &'static str {
#index_key
}
fn field_name() -> &'static str {
#name_str
}
}
};