diff --git a/examples.py b/examples.py index 7dc2842..84d46cb 100644 --- a/examples.py +++ b/examples.py @@ -6,7 +6,7 @@ from utils.misc_utils import immutable_to_list if __name__ == '__main__': db = pseudodb.PseudoDB('pseudodb.default.data') - data_collections = db.data_collections() + data_collections = db.get_collections() print("Collections in Pseudodb: "+str(data_collections)) for collection in data_collections: print("Collection: "+collection) diff --git a/pseudodb/pseudodb.py b/pseudodb/pseudodb.py index 68bdb51..de44ca0 100644 --- a/pseudodb/pseudodb.py +++ b/pseudodb/pseudodb.py @@ -15,7 +15,7 @@ class PseudoDB: print(f"Data module '{module_name}' not found.") return None - def data_collections(self): + def get_collections(self): # Check if default has been successfully loaded if self.data is not None: attr_names = [] @@ -26,12 +26,6 @@ class PseudoDB: else: return [] - def collections(self, attr_name): - if self.data is not None: - return getattr(self.data, attr_name) - else: - return None - def get_keys(self, attr_name): if self.data is not None: collection = getattr(self.data, attr_name)