(
self,
uid: Any,
)
| 130 | return obj |
| 131 | |
| 132 | async def find_by_id( |
| 133 | self, |
| 134 | uid: Any, |
| 135 | ) -> T | None: |
| 136 | query = select(self._model).where(getattr(self._model, self._id_field) == uid) |
| 137 | async with self.get_session() as session: |
| 138 | result = await session.execute(query) |
| 139 | return result.scalar_one_or_none() |
| 140 | |
| 141 | async def create(self, data: dict[str, Any] | T) -> T: |
| 142 | if isinstance(data, dict): |
no test coverage detected