Skip to content
This repository has been archived by the owner on May 9, 2018. It is now read-only.

findAll() support limit condition #19

Open
ccqy66 opened this issue Jan 4, 2018 · 3 comments
Open

findAll() support limit condition #19

ccqy66 opened this issue Jan 4, 2018 · 3 comments
Assignees

Comments

@ccqy66
Copy link
Member

ccqy66 commented Jan 4, 2018

example:
List users = user.findAll(Limit.of(5,5),OrderBy.desc("id"));

@ccqy66 ccqy66 self-assigned this Jan 4, 2018
@dongm2ez
Copy link
Member

dongm2ez commented Jan 4, 2018

other implementation example:

PageInfo pageInfo = PageHelper.startPage(page, size).doSelectPageInfo(() -> eventService.findAll());
List list = PageHelper.startPage(page, size).doSelectPage(() -> eventService.findAll());
Long count = PageHelper.startPage(page, size).doCount(() -> eventService.findAll());

@dongm2ez
Copy link
Member

dongm2ez commented Jan 4, 2018

maybe limit feature should is independent lib

@ccqy66
Copy link
Member Author

ccqy66 commented Jan 4, 2018

maybe,but the pr is supported for ActiveRecord.
when invoke ActiveRecord#findAll(),maybe need to control count of result.so add limit condition

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants