Last active
April 7, 2017 09:20
-
-
Save kaisteel/f5523db653f589c6ba39685692bd701a to your computer and use it in GitHub Desktop.
Pagination example with Metamug resource file
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="UTF-8" ?> | |
<Resource xmlns="http://xml.metamug.net/resource/1.0" v="1.0"> | |
<Request method="GET"> | |
<Desc>Request to display a single page. | |
User needs to calculate offset = limit + offset | |
for each subsequent request. Offset is 900 i.e There are 1000 records. | |
Limit being 100, Page size cannot be more than 100. | |
</Desc> | |
<Param name="limit" type="number" min="0" max="100"/> | |
<Param name="offset" type="number" min="0" max="900"/> | |
<Query requires="limit,offset" limit="limit" offset="offset"> | |
select * from tbl_task_master | |
</Query> | |
</Request> | |
</Resource> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment