class Database(object):
def __init__(self, connection, db_name):
self.connection = connection
class Database(object):
def __init__(self, connection, db_name):
self.connection = connection
def __getattr__(self, table_name):
return Collection(self, table_name)
def __getattr__(self, table_name):
return Collection(self, table_name)