Skip to content

Commit

Permalink
Clarify return on select_records
Browse files Browse the repository at this point in the history
  • Loading branch information
donaldcampbelljr committed Nov 16, 2023
1 parent b414330 commit dfa7616
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 3 deletions.
7 changes: 6 additions & 1 deletion pipestat/backends/db_backend/dbbackend.py
Original file line number Diff line number Diff line change
Expand Up @@ -391,7 +391,12 @@ def select_records(
:param int limit: maximum number of results to retrieve per page
:param int cursor: cursor position to begin retrieving records
:param bool bool_operator: Perform filtering with AND or OR Logic.
:return Dict[str, Any]
:return dict records_dict = {
"total_size": int,
"page_size": int,
"next_page_token": int,
"records": List[Dict[{key, Any}]],
}
"""

ORM = self.get_model(table_name=self.table_name)
Expand Down
7 changes: 6 additions & 1 deletion pipestat/backends/file_backend/filebackend.py
Original file line number Diff line number Diff line change
Expand Up @@ -431,7 +431,12 @@ def select_records(
:param int limit: maximum number of results to retrieve per page
:param int cursor: cursor position to begin retrieving records
:param bool bool_operator: Perform filtering with AND or OR Logic.
:return Dict[str, Any]
:return dict records_dict = {
"total_size": int,
"page_size": int,
"next_page_token": int,
"records": List[Dict[{key, Any}]],
}
"""
if cursor:
_LOGGER.warning("Cursor not supported for FileBackend, ignoring cursor")
Expand Down
7 changes: 6 additions & 1 deletion pipestat/pipestat.py
Original file line number Diff line number Diff line change
Expand Up @@ -579,7 +579,12 @@ def select_records(
:param int limit: maximum number of results to retrieve per page
:param int cursor: cursor position to begin retrieving records
:param bool bool_operator: Perform filtering with AND or OR Logic.
:return Dict[str, Any]
:return dict records_dict = {
"total_size": int,
"page_size": int,
"next_page_token": int,
"records": List[Dict[{key, Any}]],
}
"""

return self.backend.select_records(
Expand Down

0 comments on commit dfa7616

Please sign in to comment.