MCPcopy Create free account
hub / github.com/dbunt1tled/python-fast-api / update_many

Method update_many

src/core/db/repository.py:173–180  ·  view source on GitHub ↗
(self, filters: list[Filter], update_data: dict[str, Any])

Source from the content-addressed store, hash-verified

171 return entity
172
173 async def update_many(self, filters: list[Filter], update_data: dict[str, Any]) -> int:
174 query = update(self._model)
175 query = self._apply_filters(query, filters)
176 query = query.values(**update_data)
177
178 async with self.get_session() as session:
179 result = await session.execute(query)
180 return result.rowcount or 0
181
182 async def delete(self, uid: Any) -> bool:
183 db_obj = await self.find_by_id(uid)

Callers

nothing calls this directly

Calls 3

_apply_filtersMethod · 0.95
get_sessionMethod · 0.95
executeMethod · 0.45

Tested by

no test coverage detected