mirror of
https://github.com/FlipsideCrypto/sdk.git
synced 2026-02-06 10:46:43 +00:00
Add page stats to response payload.
This commit is contained in:
parent
10ade8a1c8
commit
13b5dae883
@ -1 +1 @@
|
||||
2.0.4
|
||||
2.0.5
|
||||
@ -21,6 +21,7 @@ class QueryResultSetBuilder(object):
|
||||
self.errorData = query_run.errorData
|
||||
self.dataSourceQueryId = query_run.dataSourceQueryId
|
||||
self.dataSourceSessionId = query_run.dataSourceSessionId
|
||||
self.page = query_result.page
|
||||
self.path = query_run.path
|
||||
|
||||
self.run_stats = self.compute_run_stats(query_run)
|
||||
@ -35,6 +36,7 @@ class QueryResultSetBuilder(object):
|
||||
rows=self.rows,
|
||||
run_stats=self.run_stats,
|
||||
records=self.records,
|
||||
page=self.page,
|
||||
error=None,
|
||||
)
|
||||
|
||||
|
||||
@ -2,6 +2,7 @@ from typing import Any, List, Union
|
||||
|
||||
from pydantic import BaseModel, Field
|
||||
|
||||
from .compass.core.page_stats import PageStats
|
||||
from .query_run_stats import QueryRunStats
|
||||
|
||||
|
||||
@ -25,4 +26,7 @@ class QueryResultSet(BaseModel):
|
||||
records: Union[List[Any], None] = Field(
|
||||
None, description="The results of the query transformed as an array of objects"
|
||||
)
|
||||
page: Union[PageStats, None] = Field(
|
||||
None, description="Summary of page stats for this query result set"
|
||||
)
|
||||
error: Any
|
||||
|
||||
Loading…
Reference in New Issue
Block a user