Skip to content

Allow diesel_dynamic_schema runtime columns in GROUP BY/ HAVING - #5165

Open
LucaCappelletti94 wants to merge 2 commits into
diesel-rs:mainfrom
LucaCappelletti94:dynamic-schema-grouping
Open

Allow diesel_dynamic_schema runtime columns in GROUP BY/ HAVING#5165
LucaCappelletti94 wants to merge 2 commits into
diesel-rs:mainfrom
LucaCappelletti94:dynamic-schema-grouping

Conversation

@LucaCappelletti94

Copy link
Copy Markdown
Member

diesel_dynamic_schema runtime columns only implemented ValidGrouping<()>, so .group_by(col) and .having(pred) could not work. This adds a blanket ValidGrouping<GB> for Column so both clauses work, including grouping by a tuple of runtime columns.

The associated type is is_aggregate::Never as a runtime column cannot be checked for membership in the GROUP BY.

I am unsure whether there was any reason for the lack of support, or this was just a missing feature.

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.

1 participant