Skip to content

Instantly share code, notes, and snippets.

@kaisteel
Last active April 7, 2017 09:20
Show Gist options
  • Save kaisteel/f5523db653f589c6ba39685692bd701a to your computer and use it in GitHub Desktop.
Save kaisteel/f5523db653f589c6ba39685692bd701a to your computer and use it in GitHub Desktop.
Pagination example with Metamug resource file
<?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