You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@sdap.apache.org by "skorper (via GitHub)" <gi...@apache.org> on 2023/06/28 22:01:23 UTC

[GitHub] [incubator-sdap-nexus] skorper commented on a diff in pull request #261: SDAP-467: Pagination

skorper commented on code in PR #261:
URL: https://github.com/apache/incubator-sdap-nexus/pull/261#discussion_r1245813468


##########
analysis/webservice/algorithms/doms/ResultsStorage.py:
##########
@@ -302,12 +302,12 @@ def __enrichPrimaryDataWithMatches(self, id, dataMap, trim_data=False):
             else:
                 print(row)
 
-    def __retrievePrimaryData(self, id, trim_data=False):
-        cql = "SELECT * FROM doms_data where execution_id = %s and is_primary = true"
-        rows = self._session.execute(cql, (id,))
+    def __retrievePrimaryData(self, id, trim_data=False, page_num=2, page_size=10):
+        cql = "SELECT * FROM doms_data where execution_id = %s and is_primary = true limit %s"
+        rows = self._session.execute(cql, [id, page_num * page_size])

Review Comment:
   I couldn't find a way to easily do CQL offsets so this is where I landed



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscribe@sdap.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org