Beispiel #1
0
 def _query(self, query_arg: QueryArg) -> List[ItemResult]:
     args = query_arg.get_kwargs(self.table_name, self.primary_index)
     with self._dispatch_error():
         query_res = self._client.query(**args)
         all_items = query_res.get('Items', [])
         while 'LastEvaluatedKey' in query_res:
             query_res = self._client.query(
                 ExclusiveStartKey=query_res['LastEvaluatedKey'], **args)
             all_items.extend(query_res.get('Items', []))
     return self._normalize_items(all_items)
Beispiel #2
0
 def _query(self, query_arg: QueryArg) -> List[ItemResult]:
     args = query_arg.get_kwargs(self.table_name, self.primary_index)
     with self._dispatch_error():
         query_res = self._client.query(**args)
     items = query_res.get('Items', [])
     return self._normalize_items(items)