Skip to content
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

Add Model\AggregateModel model #817

Merged
merged 81 commits into from
Apr 15, 2022
Merged

Conversation

georgehristov
Copy link
Collaborator

@georgehristov georgehristov commented Dec 29, 2020

extracted from atk4/report and original #677

@georgehristov georgehristov force-pushed the feature/introduce-aggregate-model branch from dc3a13a to 690e1ca Compare December 29, 2020 11:41

// simple condition
if ($condition instanceof Model\Scope\Condition) {
$query->having(...$condition->toQueryArguments());
Copy link
Member

Choose a reason for hiding this comment

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

having is an interesting argument for Aggregate class, but we may use HAVING instead or WHERE when grouping is active in general (before we can analyse if HAVING is really needed)

Copy link
Member

@mvorisek mvorisek Dec 29, 2020

Choose a reason for hiding this comment

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

Ok for now if we will integrate it for wrapping like now... But keep this unresolved in GH discussion.

Copy link
Member

Choose a reason for hiding this comment

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

not if we wrap as subquery...

Copy link
Member

Choose a reason for hiding this comment

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

Related with https://github.com/atk4/data/pull/853/files#diff-7e7810cb7d196a13e4c0b10d1c737e5ead3e3169bd82f6b4c1149dcf67d726f0R384 , I belive wrapping is the only solution, having requires group by across all columns for some DB vendors (even if grouped by some unique column)

Copy link
Member

@mvorisek mvorisek Jan 6, 2022

Choose a reason for hiding this comment

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

TODO after #946 - traversing may be implemented using model wrapping

but it will require "virtualized Fields" - maybe we should always impl. different persistence fields using specific subobjects

georgehristov and others added 3 commits December 29, 2020 15:05
Co-authored-by: Michael Voříšek <mvorisek@mvorisek.cz>
@mvorisek mvorisek force-pushed the feature/introduce-aggregate-model branch 2 times, most recently from 30570d4 to 9d647a2 Compare March 14, 2022 16:09
@mvorisek mvorisek force-pushed the feature/introduce-aggregate-model branch from 9d647a2 to 3db6a8a Compare March 14, 2022 16:11
@mvorisek
Copy link
Member

@georgehristov this PR is almost done, please let me know if you have any feedback

@mvorisek mvorisek force-pushed the feature/introduce-aggregate-model branch from df01c10 to a40350f Compare April 15, 2022 18:11
@mvorisek mvorisek force-pushed the feature/introduce-aggregate-model branch from a40350f to a7d86d9 Compare April 15, 2022 19:00
@mvorisek mvorisek force-pushed the feature/introduce-aggregate-model branch from a7d86d9 to 431da2e Compare April 15, 2022 19:25
@mvorisek mvorisek force-pushed the feature/introduce-aggregate-model branch from 431da2e to 5d8ee39 Compare April 15, 2022 19:31
@mvorisek mvorisek force-pushed the feature/introduce-aggregate-model branch from 2f27f5d to a46433d Compare April 15, 2022 20:29
@mvorisek mvorisek force-pushed the feature/introduce-aggregate-model branch from 8a28632 to 95af333 Compare April 15, 2022 21:02
@mvorisek mvorisek force-pushed the feature/introduce-aggregate-model branch from 257ba85 to c6c8921 Compare April 15, 2022 22:54
@mvorisek mvorisek added the MAJOR label Apr 15, 2022
@mvorisek mvorisek merged commit 8b47b2d into develop Apr 15, 2022
@mvorisek mvorisek deleted the feature/introduce-aggregate-model branch April 15, 2022 23:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Development

Successfully merging this pull request may close these issues.

3 participants