Adding sync with imported parts

This commit is contained in:
Ian Roddis committed 2026-07-02 12:55:13 -03:00
1 parent 00fb43c8ed
commit c320595423
11 files changed
+300 -4

No files matched your search

+7
View File
@@ -8,6 +8,13 @@ async def get(db: AsyncSession, manufacturer_id: int) -> Manufacturer | None:
return await db.get(Manufacturer, manufacturer_id)
async def get_by_name(db: AsyncSession, name: str) -> Manufacturer | None:
result = await db.execute(
select(Manufacturer).where(Manufacturer.name == name)
)
return result.scalar_one_or_none()
async def list_all(
db: AsyncSession, skip: int = 0, limit: int = 100
) -> list[Manufacturer]: