'Loads the IDs/UIDs of all records matching the current filter'

def __load_ids(self):

    table = self.table
    UID = current.xml.UID
    pkey = table._id.name
    if (UID in table.fields):
        has_uid = True
        fields = (pkey, UID)
    else:
        has_uid = False
        fields = (pkey,)
    rfilter = self.rfilter
    multiple = (rfilter.multiple if (rfilter is not None) else True)
    if ((not multiple) and self.parent and (self.parent.count() == 1)):
        start = 0
        limit = 1
    else:
        start = limit = None
    rows = self.select(fields, start=start, limit=limit)['rows']
    if rows:
        ID = str(table._id)
        self._ids = [row[ID] for row in rows]
        if has_uid:
            uid = str(table[UID])
            self._uids = [row[uid] for row in rows]
    else:
        self._ids = []
    return
