# HG changeset patch # User Goffi # Date 1652457531 -7200 # Node ID 10b71e3526bdc6e4c2957a97f46c61b2186e3fed # Parent 5f546dd910e03c1e70ad1ad209599f8c9b786639 core (memory/sqla): add attribute to filter on `item_ids` in `getItems` diff -r 5f546dd910e0 -r 10b71e3526bd sat/memory/sqla.py --- a/sat/memory/sqla.py Fri May 13 17:57:24 2022 +0200 +++ b/sat/memory/sqla.py Fri May 13 17:58:51 2022 +0200 @@ -1224,6 +1224,7 @@ self, node: PubsubNode, max_items: Optional[int] = None, + item_ids: Optional[list[str]] = None, before: Optional[str] = None, after: Optional[str] = None, from_index: Optional[int] = None, @@ -1279,6 +1280,9 @@ .limit(max_items) ) + if item_ids is not None: + stmt = stmt.where(PubsubItem.name.in_(item_ids)) + if not order_by: order_by = [C.ORDER_BY_MODIFICATION]