add limit and offset

This commit is contained in:
Robin Appelman 2017-03-10 15:53:28 +01:00
commit 0924fa90e0
8 changed files with 132 additions and 2 deletions

37
tests/limit.xml Normal file
View file

@ -0,0 +1,37 @@
<?xml version="1.0"?>
<d:searchrequest xmlns:d="DAV:"
xmlns:sd="https://github.com/icewind1991/SearchDAV/ns">
<d:basicsearch>
<d:select>
<d:prop>
<d:getcontentlength/>
</d:prop>
</d:select>
<d:from>
<d:scope>
<d:href>/container1/</d:href>
<d:depth>infinity</d:depth>
</d:scope>
</d:from>
<d:where>
<d:gt>
<d:prop>
<d:getcontentlength/>
</d:prop>
<d:literal>10000</d:literal>
</d:gt>
</d:where>
<d:orderby>
<d:order>
<d:prop>
<d:getcontentlength/>
</d:prop>
<d:ascending/>
</d:order>
</d:orderby>
<d:limit>
<d:nresults>10</d:nresults>
<sd:firstresult>20</sd:firstresult>
</d:limit>
</d:basicsearch>
</d:searchrequest>