apache / apache/grails-core

[Feature request] Allow scroll method to set ScrollMode

Open
#14,650 0 comments 1 reaction 0 assignees View on GitHub
relates-to: grails-data-hibernate5
Dominant language
Groovy
Stars
2.9k
Forks
975
Avg merge
1d 22h
Merged PRs (30d)
92

Description

AbstractHibernateCriteriaBuilder has a scroll method which just calls Criteria.scroll() on the underlying Criteria. To facilitate scrolling through a large data set I need to set the ScrollMode to ScrollMode.FORWARD_ONLY (which allows postgresql to load the rows in batches). However there is no method in the AbstractHibernateCriteriaBuilder to call the underlying Criteria.scroll(ScrollMode scrollMode) method. I had to subclass the Dialect but then that means I can never use another srcoll mode.

Contributor guide

Open the contributing guide

Research direction

Start at AbstractHibernateCriteriaBuilder and compare its scroll method with the underlying Criteria.scroll() overload that accepts ScrollMode. Check how ScrollMode.FORWARD_ONLY is represented in the existing Hibernate integration and add coverage for selecting that mode while scrolling. Done means callers can choose a scroll mode without subclassing the Dialect.

Written by the indexing model from the issue text.

Assessment

Tech stack
groovy, postgresql
Domain
databases
Issue type
Feature
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
55/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.