'Add joins to this collection
@param joins: a join or a list/tuple of joins
@return: the list of names of all tables for which joins have
been added to the collection'

def add(self, joins):

    tablenames = set()
    if joins:
        if (not isinstance(joins, (list, tuple))):
            joins = [joins]
        for join in joins:
            tablename = join.first._tablename
            self[tablename] = [join]
            tablenames.add(tablename)
    return list(tablenames)
