AirBnB_clone_v2
AirBnB_clone_v2 copied to clipboard
Storage get count
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.