@classmethod
def join(cls, table, on, join_type=None):
    """
        Adds a join clause to the current query.
        """
    if type(on) == tuple:
        on = cls.__db__.get_table(on[0]), on[1]
    cls.__query__.join(cls.__db__.get_table(table), on, join_type)
    return cls
