@@ -275,6 +275,7 @@ def delete_item(self, item_id: str, collection_id: str):
275275 )
276276
277277 def create_collection (self , collection : stac_types .Collection ):
278+ """Database logic for creating one collection."""
278279 if self .client .exists (index = COLLECTIONS_INDEX , id = collection ["id" ]):
279280 raise ConflictError (f"Collection { collection ['id' ]} already exists" )
280281
@@ -285,20 +286,22 @@ def create_collection(self, collection: stac_types.Collection):
285286 )
286287
287288 def prep_update_collection (self , collection_id : str ):
289+ """Database logic for updating a collection."""
288290 try :
289291 _ = self .client .get (index = COLLECTIONS_INDEX , id = collection_id )
290292 except elasticsearch .exceptions .NotFoundError :
291293 raise NotFoundError (f"Collection { collection_id } not found" )
292294
293295 def delete_collection (self , collection_id : str ):
296+ """Database logic for deleting one collection."""
294297 try :
295298 _ = self .client .get (index = COLLECTIONS_INDEX , id = collection_id )
296299 except elasticsearch .exceptions .NotFoundError :
297300 raise NotFoundError (f"Collection { collection_id } not found" )
298301 self .client .delete (index = COLLECTIONS_INDEX , id = collection_id )
299302
300- def bulk_sync (self , processed_items ):
301- """Database logic for bulk insertion."""
303+ def bulk_sync (self , processed_items ):
304+ """Database logic for bulk item insertion."""
302305 actions = [
303306 {
304307 "_index" : ITEMS_INDEX ,
0 commit comments