File tree Expand file tree Collapse file tree
docs/docs/00200-core-concepts/00100-databases Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -9,7 +9,7 @@ struct PlayerInfo {
99 age : u8 ,
1010}
1111/// Comparing incompatible types in `where` condition: u8 != u32 implicitly
12- #[ view( name = view_bad_where_int_types_implicit, public) ]
12+ #view ( accessor = view_bad_where_int_types_implicit, public) ]
1313fn view_bad_where_int_types_implicit ( ctx : & ViewContext ) -> impl Query < PlayerInfo > {
1414 ctx. from . player_info ( ) . r#where ( |a| a. age . eq ( 4200 ) ) . build ( )
1515}
Original file line number Diff line number Diff line change @@ -647,7 +647,7 @@ fn top_players(ctx: &ViewContext) -> Vec<Player> {
647647
648648// Perform a generic filter using the query builder.
649649// Equivalent to `SELECT * FROM player WHERE score < 1000`.
650- #[ view(name = bottom_players, public)]
650+ #view (accessor = bottom_players , public )]
651651fn bottom_players (ctx : & ViewContext ) -> impl Query <Player > {
652652 ctx . from. player (). r#where (| p | p . score. lt (1000 ))
653653}
You can’t perform that action at this time.
0 commit comments