mirror of
https://github.com/rommapp/romm.git
synced 2026-02-18 00:27:41 +01:00
add comments to backend code
This commit is contained in:
@@ -478,6 +478,7 @@ def get_roms(
|
||||
platforms=[],
|
||||
)
|
||||
if with_filter_values:
|
||||
# We use the unfiltered query so applied filters don't affect the list
|
||||
filter_query = db_rom_handler.filter_roms(
|
||||
query=unfiltered_query,
|
||||
user_id=request.user.id,
|
||||
|
||||
@@ -1286,6 +1286,9 @@ class DBRomsHandler(DBBaseHandler):
|
||||
query: Query,
|
||||
session: Session = None, # type: ignore
|
||||
) -> dict:
|
||||
"""
|
||||
Returns the list of filters given the current subset of ROMs in the query
|
||||
"""
|
||||
ids_subq = query.with_only_columns(Rom.id).scalar_subquery() # type: ignore
|
||||
|
||||
statement = (
|
||||
@@ -1313,6 +1316,9 @@ class DBRomsHandler(DBBaseHandler):
|
||||
self,
|
||||
session: Session = None, # type: ignore
|
||||
) -> dict:
|
||||
"""
|
||||
Returns all filter values across all ROM metadata
|
||||
"""
|
||||
statement = select(
|
||||
RomMetadata.genres,
|
||||
RomMetadata.franchises,
|
||||
|
||||
Reference in New Issue
Block a user