Thanks to visit codestin.com
Credit goes to github.com

Skip to content

feat: support native GROUP BY expressions (NativeGroupByWrapper) - #200

Merged
brunomendola merged 1 commit into
queritylib:mainfrom
vage88sg1:feature/native-group-by
Jul 22, 2026
Merged

brunomendola merged 1 commit into
queritylib:mainfrom
vage88sg1:feature/native-group-by

Conversation

@vage88sg1

Copy link
Copy Markdown
Contributor

Add the missing native wrapper for GROUP BY, mirroring NativeSelectWrapper and NativeSortWrapper (closes #198):

  • NativeGroupByWrapper (querity-api) with Querity.groupByNative(...) factory
  • GroupBySpecification functional interface (querity-jpa-common), the deferred (Root, CriteriaBuilder) -> Expression counterpart of OrderSpecification/SelectionSpecification
  • JpaNativeGroupByWrapper + dispatch in JpaGroupBy.of()

This allows grouping by expressions the querity model cannot express (e.g. jsonb_extract_path_text over a jsonb column) so that native selections can be combined with aggregates computed per group.

Add the missing native wrapper for GROUP BY, mirroring NativeSelectWrapper
and NativeSortWrapper (closes queritylib#198):

- NativeGroupByWrapper<T> (querity-api) with Querity.groupByNative(...) factory
- GroupBySpecification<T> functional interface (querity-jpa-common), the
  deferred (Root, CriteriaBuilder) -> Expression counterpart of
  OrderSpecification/SelectionSpecification
- JpaNativeGroupByWrapper + dispatch in JpaGroupBy.of()

This allows grouping by expressions the querity model cannot express
(e.g. jsonb_extract_path_text over a jsonb column) so that native
selections can be combined with aggregates computed per group.
@brunomendola
brunomendola merged commit 393359c into queritylib:main Jul 22, 2026
1 of 2 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.

Support native GROUP BY expressions (NativeGroupByWrapper)

2 participants