AirBnB_clone_v2 icon indicating copy to clipboard operation
AirBnB_clone_v2 copied to clipboard

Storage get count

Open aetheric0 opened this issue 6 months ago • 0 comments

File: models/engine/db_storage.py Added: db_get(self, cls=None, id) - Retrieves an object from DB storage based on class name and ID db_count(cls) - Counts the number of objects in DB storage based on class name. If class name is None then counts the total number of objects in storage.

File: models/engine/file_storage.py Added: db_get(self, cls=None, id) - Retrieves an object from FILE storage based on class name and ID db_count(cls) - Counts the number of objects in FILE storage based on class name. If class name is None then counts the total number of objects in storage.

aetheric0 avatar Aug 03 '24 14:08 aetheric0