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

Support for ranged fetch specifications #385

Merged
merged 4 commits into from
Feb 12, 2013

Conversation

darkv
Copy link
Member

@darkv darkv commented Feb 12, 2013

This patch adds support for fetch specifications with a range to H2 and PostgreSQL plugins taken from the MySQL plugin.

Example:

EOEditingContext ec = ERXEC.newEditingContext();
ERXFetchSpecification<City> fs = new ERXFetchSpecification<City>(City.ENTITY_NAME);
fs.setSortOrderings(City.SIZE.ascs());
fs.setFetchRange(new NSRange(10, 5));
NSArray<City> cities = ec.objectsWithFetchSpecification(fs);

This will fetch rows 10 through 15 from table City.

If by mistake you have set a range and a limit (fs.setFetchLimit()) the range will win and the limit of your fetch specification will be changed to 0.

darkv added a commit that referenced this pull request Feb 12, 2013
Support for ranged fetch specifications
@darkv darkv merged commit 8e082b7 into wocommunity:integration Feb 12, 2013
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