Skip to content

feat: Added $distinct parameter to SelectQuery::count - #242

Merged
roxblnfk merged 2 commits into
cycle:2.xfrom
bbldn:feature/add-count-distinct
Mar 19, 2026
Merged

roxblnfk merged 2 commits into
cycle:2.xfrom
bbldn:feature/add-count-distinct

Conversation

@bbldn

@bbldn bbldn commented Feb 28, 2026

Copy link
Copy Markdown
Contributor
  • Added $distinct parameter to SelectQuery::count

🤔 Why?

OrmIssues546

@bbldn
bbldn requested review from a team as code owners February 28, 2026 22:19
@bbldn
bbldn force-pushed the feature/add-count-distinct branch from 4924eaf to 1c55d64 Compare February 28, 2026 22:27
);

$this->assertSame(4, $table->select()->count('DISTINCT(id)'));
$this->assertSame(4, $table->select()->count('id', true));

@roxblnfk roxblnfk Mar 2, 2026 •

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Please test it in a new function. The both cases should be covered

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

ready

@roxblnfk
roxblnfk merged commit 23842c0 into cycle:2.x Mar 19, 2026
31 of 32 checks passed
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