We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent d4de42f commit 500f20dCopy full SHA for 500f20d
backend/common/pagination.py
@@ -111,15 +111,16 @@ def test() -> ResponseSchemaModel[PageData[GetApiDetail]]:
111
items: Sequence[SchemaT]
112
113
114
-async def paging_data(db: AsyncSession, select: Select) -> dict[str, Any]:
+async def paging_data(db: AsyncSession, select: Select, **kwargs) -> dict[str, Any]:
115
"""
116
基于 SQLAlchemy 创建分页数据
117
118
:param db: 数据库会话
119
:param select: SQL 查询语句
120
+ :param kwargs: 更多 fastapi-pagination apaginate 参数
121
:return:
122
- paginated_data: _CustomPage = await apaginate(db, select)
123
+ paginated_data: _CustomPage = await apaginate(db, select, **kwargs)
124
page_data = paginated_data.model_dump()
125
return page_data
126
0 commit comments