Compare commits
4 Commits
db0d1fb6a5
...
main
| Author | SHA1 | Date | |
|---|---|---|---|
| 68351f695a | |||
| e6860e67c2 | |||
| 552264aaee | |||
| 66c7ee7a74 |
@@ -69,7 +69,7 @@ async def execute_select(
|
||||
@router.get(path="/fetch_cursor", dependencies=[Depends(get_current_user)])
|
||||
async def fetch_cursor(
|
||||
cursor_id: str,
|
||||
page_size: Annotated[int, Field(ge=1, le=1000)] = 50,
|
||||
page_size: Annotated[int, Field(ge=1, le=50_000)] = 50,
|
||||
) -> SelectResult:
|
||||
cached_cursor = mysql.cached_cursors.get(cursor_id, None)
|
||||
if cached_cursor is None:
|
||||
@@ -78,6 +78,8 @@ async def fetch_cursor(
|
||||
|
||||
if cached_cursor.done:
|
||||
mysql.cached_cursors.pop(cursor_id, None)
|
||||
else:
|
||||
cached_cursor.close_at = cached_cursor.upgrade_close_at()
|
||||
|
||||
return SelectResult(
|
||||
cursor=cached_cursor,
|
||||
|
||||
Reference in New Issue
Block a user