From cfb48a8d1128b9a6bb13cbe79b395ee8fe525624 Mon Sep 17 00:00:00 2001 From: Ethan Dalool Date: Fri, 11 Sep 2020 22:13:30 -0700 Subject: [PATCH] Add disclaimer about yield order to get_things_by_id. --- etiquette/photodb.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/etiquette/photodb.py b/etiquette/photodb.py index 7b91033..44de650 100644 --- a/etiquette/photodb.py +++ b/etiquette/photodb.py @@ -292,6 +292,10 @@ class PDBCacheManagerMixin: and which ones need to be selected from the db. This is better than calling get_thing_by_id in a loop because we can use a single SQL select to get batches of up to 999 items. + + Note: The order of the output will most likely not match the order of + the input, because we first pull items from the cache before requesting + the rest from the database. ''' thing_map = self._THING_CLASSES[thing_type] thing_class = thing_map['class']