Feat: add add tribe

This commit is contained in:
2022-12-26 19:21:00 +01:00
parent fe92433311
commit f73ad3a34d
3 changed files with 48 additions and 3 deletions

View File

@@ -7,7 +7,16 @@ class TribeSQLiteRepository(AbstractRepository):
self.conn = conn
def add(self, tribe: Tribe) -> None:
pass
cursor = self.conn.cursor()
cursor.execute(
"""
INSERT INTO tribes(name, level) VALUES (?, ?)
""",
(
tribe.name,
tribe.level,
),
)
def update(self, name: str, tribe: Tribe) -> None:
pass