AirBnB_clone_v2 icon indicating copy to clipboard operation
AirBnB_clone_v2 copied to clipboard

Storage get count

Open SphaxWare opened this issue 10 months ago • 1 comments

added these changes A method to retrieve one object:

  • Prototype: def get(self, cls, id): cls: class id: string representing the object ID Returns the object based on the class and its ID, or None if not found

A method to count the number of objects in storage:

  • Prototype: def count(self, cls=None): cls: class (optional) Returns the number of objects in storage matching the given class. If no class is passed, returns the count of all objects in storage.

SphaxWare avatar Mar 30 '24 14:03 SphaxWare

confirmed

MegaChie avatar Mar 30 '24 15:03 MegaChie