diff --git a/sat/memory/sqla.py b/sat/memory/sqla.py index 263d3289..d11eaba5 100644 --- a/sat/memory/sqla.py +++ b/sat/memory/sqla.py @@ -1425,6 +1425,8 @@ class Storage: :subtypes (list[str|None]): filter on nodes with those subtypes. None can be used to filter on nodes with no subtype set + :names (list[str]): + filter on items with those names :parsed (list[dict]): Filter on a parsed data field. The dict must contain 3 keys: ``path`` which is a list of str or int giving the path to the field of interest @@ -1511,6 +1513,11 @@ class Storage: else: stmt = stmt.options(selectinload(PubsubItem.node)) + # names + names = query.get("names") + if names: + stmt = stmt.where(PubsubItem.name.in_(names)) + # parsed data filters parsed = query.get("parsed", []) for filter_ in parsed: