mirror of
https://github.com/283375/arcaea-offline.git
synced 2025-04-14 12:00:19 +00:00
feat(db): get_songs_by_pack_id
This commit is contained in:
parent
589826004b
commit
c909886902
@ -130,6 +130,12 @@ class Database(metaclass=Singleton):
|
||||
results = list(session.scalars(stmt))
|
||||
return results
|
||||
|
||||
def get_songs_by_pack_id(self, pack_id: str):
|
||||
stmt = select(Song).where(Song.set == pack_id)
|
||||
with self.sessionmaker() as session:
|
||||
results = list(session.scalars(stmt))
|
||||
return results
|
||||
|
||||
def get_song(self, song_id: str):
|
||||
stmt = select(Song).where(Song.id == song_id)
|
||||
with self.sessionmaker() as session:
|
||||
|
Loading…
x
Reference in New Issue
Block a user