manual submit
This commit is contained in:
@@ -213,6 +213,19 @@ def get_all_images() -> list[dict]:
|
||||
return [dict(r) for r in rows]
|
||||
|
||||
|
||||
def get_images_by_ids(ids: list[int]) -> list[dict]:
|
||||
"""Return image rows for the given ids (excluding image_data), ordered by id DESC."""
|
||||
if not ids:
|
||||
return []
|
||||
placeholders = ",".join("?" * len(ids))
|
||||
with _connect() as conn:
|
||||
rows = conn.execute(
|
||||
f"SELECT {_SAFE_COLS} FROM input_images WHERE id IN ({placeholders}) ORDER BY id DESC",
|
||||
tuple(ids),
|
||||
).fetchall()
|
||||
return [dict(r) for r in rows]
|
||||
|
||||
|
||||
def delete_image(row_id: int, comfy_input_path: str | None = None) -> None:
|
||||
"""
|
||||
Remove an image record from the database.
|
||||
|
||||
Reference in New Issue
Block a user