java - How can I select a limited number of records from my database as well as the total count of those records using jOOQ in one DB call? -
this question has answer here:
i have rest service returns number of records mysql database based on search criteria.
i select number of records database match criteria, limiting them x number of records (for more efficient transport on http , pagination), know how many there in total in database can calculate number of pages.
i'm using jooq in persistence layer.
is there way retrieve records , total number of records in 1 database call, or have 2 calls? 1 select , 1 count?
Comments
Post a Comment