'Select a subset of rows by their record IDs
@param rows: the Rows
@param ids: the record IDs
@param pkey: the primary key
@return: the subset (Rows)'

def getrows(self, rows, ids, pkey):

    if ids:
        ids = set(ids)
        subset = (lambda row: (row[pkey] in ids))
    else:
        subset = (lambda row: False)
    return rows.find(subset)
