Skip to content

Conversation

@joleeee
Copy link
Contributor

@joleeee joleeee commented Nov 25, 2025

PR Info

No issue, but see question "FunctionCall and IntoSimpleExpr" in the discord.

New Features

Bug Fixes

allows you to do sea_orm::query::helper::QueryOrder::order_by_asc with an argument of FunctionCall directly, without having to wrap it in Expr::Functioncall

example patch i can apply to my project due to this patch:

 Ok(locations::Entity::find()
     .filter(locations::Column::Userid.eq(userid))
     .filter(dist.clone().lt(5000))
-    .order_by_asc(Expr::FunctionCall(dist))
+    .order_by_asc(dist)
     .all(tx)
     .await?)

Breaking Changes

Changes

@joleeee joleeee marked this pull request as ready for review November 26, 2025 17:37
@Huliiiiii Huliiiiii requested review from Expurple and tyt2y3 November 28, 2025 14:28
Copy link
Member

@Expurple Expurple left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If I remember correctly, now we have a blanket impl IntoSimpleExpr for T: Into<SimpleExpr> to make IntoSimpleExpr interchangable with Into<SimpleExpr>. To get that benefit, your new impl should be worded as impl From<FunctionCall> for SimpleExpr.

Good change otherwise! Thank you

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants