-
-
Notifications
You must be signed in to change notification settings - Fork 657
Optimize exists #2909
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Optimize exists #2909
Conversation
Huliiiiii
commented
Jan 12, 2026
- Closes Redundant query in PaginatorTrait::exists() #2908
tyt2y3
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
do we need to add a test case or there is already coverage?
ac2aad9 to
b6fd8fa
Compare
b6fd8fa to
5a1d504
Compare
| } | ||
| } | ||
|
|
||
| #[async_trait::async_trait] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| #[async_trait::async_trait] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
async fn in trait can’t mark the future as Send and Sync, but we can use impl future instead. Which do you prefer?
| async fn exists(self, db: &'db C) -> Result<bool, DbErr> | ||
| where | ||
| Self: Send + Sized, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am thinking whether we should keep this, at least leave behind a deprecated notice?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It was added in v2.0, so I think we can move it directly.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
haha, didn't even remember!