Skip to content

Move count() to CountTrait#3097

Merged
tyt2y3 merged 2 commits into
SeaQL:masterfrom
Huliiiiii:count-limit
Jul 19, 2026
Merged

Move count() to CountTrait#3097
tyt2y3 merged 2 commits into
SeaQL:masterfrom
Huliiiiii:count-limit

Conversation

@Huliiiiii

Copy link
Copy Markdown
Member

Breaking Changes

  • Move the count method into CountTrait to prevent accidental resets of limit and offset

@Huliiiiii
Huliiiiii requested review from Expurple and tyt2y3 June 25, 2026 04:40

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: ec0deaebef

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread src/executor/select_ext.rs Outdated
Instead of a dedicated CountTrait, keep count() as a default method on
PaginatorTrait. It wraps the query as-is in a SELECT COUNT(*) FROM (..)
subquery, so it honors any limit/offset set on the query, unlike
num_items which resets them.
@tyt2y3

tyt2y3 commented Jul 19, 2026

Copy link
Copy Markdown
Member

let's not create churn right now. but if we have new methods, say count_distinct we should put them in a new trait, or reuse SelectExt

@tyt2y3
tyt2y3 merged commit 4500c3b into SeaQL:master Jul 19, 2026
39 checks passed
@Huliiiiii
Huliiiiii deleted the count-limit branch July 19, 2026 20:23
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.

2 participants