Skip to content

Add exists method to PaginatorTrait with tests#2623

Merged
Expurple merged 8 commits intoSeaQL:masterfrom
IgnisDa:exists
Dec 2, 2025
Merged

Add exists method to PaginatorTrait with tests#2623
Expurple merged 8 commits intoSeaQL:masterfrom
IgnisDa:exists

Conversation

@IgnisDa
Copy link
Copy Markdown
Contributor

@IgnisDa IgnisDa commented Jun 13, 2025

Introduce an exists method to the PaginatorTrait to efficiently check for record existence.

Fixes #730.

@Expurple
Copy link
Copy Markdown
Member

Thank you! I'll review this a bit later.

TODO for myself: also merge this in master (2.0.0).

If you're ok with using your own unreleased fork of 1.1.x until 2.0.0 comes out, you can change the base of the PR to master and we'll merge this only in master.

@IgnisDa
Copy link
Copy Markdown
Contributor Author

IgnisDa commented Jun 13, 2025

Thank you! I'll review this a bit later.

TODO for myself: also merge this in master (2.0.0).

If you're ok with using your own unreleased fork of 1.1.x until 2.0.0 comes out, you can change the base of the PR to master and we'll merge this only in master.

Can this be released as a patch 1.1.x release? I think it should be fine since it does not have any breaking changes. That way I can continue to use the crates.io version.

@Expurple
Copy link
Copy Markdown
Member

Yeah, I assumed that you may want that. I'm not the one making (the decisions about) releases, but @tyt2y3 will probably do this

Copy link
Copy Markdown
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.

Sorry for the delay. Everything looks good to me!

@tyt2y3. we can merge this and then cherry-pick into master too

@Expurple Expurple requested a review from tyt2y3 July 29, 2025 14:16
@IgnisDa
Copy link
Copy Markdown
Contributor Author

IgnisDa commented Aug 5, 2025

@tyt2y3 Can you take a look at this please? Thanks!

@IgnisDa IgnisDa changed the base branch from 1.1.x to master December 1, 2025 01:28
Copy link
Copy Markdown
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.

Thank you for the wait, I'll merge this myself

@Expurple Expurple merged commit ef90a68 into SeaQL:master Dec 2, 2025
Expurple added a commit to Expurple/sea-orm that referenced this pull request Dec 7, 2025
* Add exists method to PaginatorTrait and corresponding tests

* Refactor import order and simplify exists tests for better readability

* Fix placed_at field to use ChronoDateTime for consistency in seed data

* Remove performance comparison test for exists vs count methods from exists_tests

* Refactor paginator query to use Expr::exists

* Revert "Refactor paginator query to use Expr::exists"

This reverts commit ef0521f.

* Remove unnecessary database backend builder in paginator query
Expurple added a commit that referenced this pull request Dec 7, 2025
Rebase #2623 from `master` into `1.1.x`.

This is a nice backwards-compatible feature, I'd like to have it in `1.1.x` and adopt in advance
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