Skip to content

Commit

Permalink
Start adding in simple cursor paginator
Browse files Browse the repository at this point in the history
  • Loading branch information
peytondmurray committed Nov 6, 2024
1 parent a6d5c18 commit dd5a139
Showing 1 changed file with 10 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@
from fastapi import APIRouter, Body, Depends, HTTPException, Query, Request
from fastapi.responses import PlainTextResponse, RedirectResponse

from sqlalchemy.orm import Query as SqlQuery

from conda_store_server import __version__, api, app
from conda_store_server._internal import orm, schema, utils
from conda_store_server._internal.environment import filter_environments
Expand All @@ -19,6 +21,14 @@
from conda_store_server.server.auth import Authentication


def paginate(
query: SqlQuery,
next_token: str | None = None,
sort_by: List[str] | None = None,
order: str = 'asc',
)


class PaginatedArgs(TypedDict):
"""Dictionary type holding information about paginated requests."""

Expand Down

0 comments on commit dd5a139

Please sign in to comment.