...
Parameter | isRequired | Description |
---|---|---|
cps-path | yes | node path to be queried |
descendants | no | Number of descendants to be queried. default is none |
pageIndexresultIndex | no | page index starting from 1. |
pageSizeresultSize | no | number of fragments per page starting from 1 (TBD). |
...
Query | Description | Decision |
---|---|---|
SELECT id, anchor_id AS anchorId, xpath, parent_id AS parentId, CAST(attributes AS TEXT) AS attributes FROM FRAGMENT WHERE xpath ~ :xpathRegex ORDERED BY id LIMIT :pageSize resultSize OFFSET (:pageIndex resultIndex - 1) * :pageSize resultSize | Query limited fragments in order of fragment id | |
...
we can provide pagination over anchors where client can chose choose number of anchors per request to fetch fragments from.
...
Parameter | isRequired | Description |
---|---|---|
cps-path | yes | node path to be queried |
descendants | no | Number of descendants to be queried. default is none |
pageIndexresultIndex | no | page anchor index starting from 1. |
anchorSize | no | number of anchors per page starting from 1 (TBD)request. |
Response Headers
Header | description |
---|---|
totalAnchors | total number of anchors |
resultIndex | requested index of anchor |
anchorSize | requested number of anchors |
Query
Query | Description | Decision |
---|---|---|
SELECT id FROM anchor order by id LIMIT : anchorSize OFFSET : (pageIndex resultIndex -1) * :anchorSize | query number of anchors to query from fragment tablelist of anchors | |
SELECT id, anchor_id AS anchorId, xpath, parent_id AS parentId, CAST(attributes AS TEXT) AS attributes FROM FRAGMENT WHERE anchor_id IN :anchorList AND xpath ~ :xpathRegex | query fragments for list of anchors from above query |
...