Sorry, if this is a stupid question, but from what I can see if you have a table object, there is no way to get its string name. I feel like I am missing something silly. But I have printed out dir(db.table) i can't see any attr which will give me the name of the table. I have tried tablename etc...
But i would like to be able to recover the name of the table I am working with. I am using the below to get the target table, but sometimes I have the table object and need to call another method using the tables name.
Any help appreciated
def get_table(self, table_name=None):
Return a named table or the default table
return self.db.table() if not table_name else self.db.table(table_name)