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

Group by #39

Open
nilshoerrmann opened this issue May 13, 2014 · 1 comment
Open

Group by #39

nilshoerrmann opened this issue May 13, 2014 · 1 comment

Comments

@nilshoerrmann
Copy link
Contributor

Is there a way to group the output of a Union Data Source by a field, e. g. a date fields that are named consistently across all united sources?

@brendo
Copy link
Member

brendo commented Aug 13, 2014

Not really, I wrote a long comment in the code to remind me.

Grouping will be very difficult with UnionDS. The current Grouping works on an
array level, rather then the springs to mind SQL GROUP BY. Grouping calls the
grouped field's groupRecords function, which loops over the $entries array
getting the data for the grouped field. The problem is that this uses the field_id,
so it cannot apply to other entries who are in different sections. This code untouchable
inside the Field class, so it would require something fairly crude I'd imagine to
replicate. Perhaps the $entries would have to be dissolved into same section groups and
run a group on each section before merging the array together... which has it's own set
of problems, not happening anytime soon unfortunately.

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

No branches or pull requests

2 participants