File tree 3 files changed +7
-3
lines changed
pgx-utils/src/sql_entity_graph/pg_aggregate
3 files changed +7
-3
lines changed Original file line number Diff line number Diff line change @@ -65,9 +65,10 @@ impl AggregateType {
65
65
66
66
pub ( crate ) fn entity_tokens ( & self ) -> Expr {
67
67
let ty = & self . ty ;
68
+ let ty_string = ty. to_token_stream ( ) . to_string ( ) . replace ( " " , "" ) ;
68
69
parse_quote ! {
69
70
pgx:: datum:: sql_entity_graph:: aggregate:: AggregateType {
70
- ty_source: stringify! ( #ty ) ,
71
+ ty_source: #ty_string ,
71
72
ty_id: core:: any:: TypeId :: of:: <#ty>( ) ,
72
73
full_path: core:: any:: type_name:: <#ty>( ) ,
73
74
name: None ,
Original file line number Diff line number Diff line change @@ -90,12 +90,13 @@ impl MaybeNamedVariadicType {
90
90
91
91
fn entity_tokens ( & self ) -> Expr {
92
92
let ty = self . variadic_ty . as_ref ( ) . unwrap_or ( & self . ty ) ;
93
+ let ty_string = ty. to_token_stream ( ) . to_string ( ) . replace ( " " , "" ) ;
93
94
let variadic = self . variadic_ty . is_some ( ) ;
94
95
let name = self . name . iter ( ) ;
95
96
parse_quote ! {
96
97
pgx:: datum:: sql_entity_graph:: aggregate:: MaybeVariadicAggregateType {
97
98
agg_ty: pgx:: datum:: sql_entity_graph:: aggregate:: AggregateType {
98
- ty_source: stringify! ( #ty ) ,
99
+ ty_source: #ty_string ,
99
100
ty_id: core:: any:: TypeId :: of:: <#ty>( ) ,
100
101
full_path: core:: any:: type_name:: <#ty>( ) ,
101
102
name: None #( . unwrap_or( Some ( #name) ) ) * ,
Original file line number Diff line number Diff line change @@ -517,6 +517,7 @@ impl PgAggregate {
517
517
let type_args_iter = & self . type_args . entity_tokens ( ) ;
518
518
let type_order_by_iter = self . type_order_by . iter ( ) . map ( |x| x. entity_tokens ( ) ) ;
519
519
let type_moving_state_iter = self . type_moving_state . iter ( ) ;
520
+ let type_moving_state_string = self . type_moving_state . as_ref ( ) . map ( |t| { t. to_token_stream ( ) . to_string ( ) . replace ( " " , "" ) } ) ;
520
521
let type_stype = self . type_stype . entity_tokens ( ) ;
521
522
let const_parallel_iter = self . const_parallel . iter ( ) ;
522
523
let const_finalize_modify_iter = self . const_finalize_modify . iter ( ) ;
@@ -557,9 +558,10 @@ impl PgAggregate {
557
558
msfunc: None #( . unwrap_or( Some ( stringify!( #fn_moving_state_iter) ) ) ) * ,
558
559
minvfunc: None #( . unwrap_or( Some ( stringify!( #fn_moving_state_inverse_iter) ) ) ) * ,
559
560
mstype: None #( . unwrap_or( Some ( pgx:: datum:: sql_entity_graph:: aggregate:: AggregateType {
560
- ty_source: stringify! ( #type_moving_state_iter ) ,
561
+ ty_source: #type_moving_state_string ,
561
562
ty_id: core:: any:: TypeId :: of:: <#type_moving_state_iter>( ) ,
562
563
full_path: core:: any:: type_name:: <#type_moving_state_iter>( ) ,
564
+ name: None
563
565
} ) ) ) * ,
564
566
mfinalfunc: None #( . unwrap_or( Some ( stringify!( #fn_moving_finalize_iter) ) ) ) * ,
565
567
mfinalfunc_modify: None #( . unwrap_or( #const_moving_finalize_modify_iter) ) * ,
You can’t perform that action at this time.
0 commit comments