mirror of
https://github.com/Dvorinka/swingmusic-extended.git
synced 2026-06-03 20:13:02 +00:00
start porting: playlists endpoints
This commit is contained in:
@@ -78,6 +78,10 @@ class Base(MappedAsDataclass, DeclarativeBase):
|
||||
with DbManager(commit=True) as conn:
|
||||
conn.execute(delete(cls))
|
||||
|
||||
@classmethod
|
||||
def remove_one(cls, id: int):
|
||||
cls.execute(delete(cls).where(cls.id == id), commit=True)
|
||||
|
||||
@classmethod
|
||||
def all(cls):
|
||||
return cls.execute(select(cls))
|
||||
|
||||
Reference in New Issue
Block a user