Manual filter after query in table

Is it possible to perform a manual query after loading the models from the db?
Something like this:
foreach ($table->getAllRecords() as $record) {
    if ($record->customFunctionOrFilter()){
        unset($record);
    }
}

return $table
          ->columns([...])


I know this hasn't the best performance.
Was this page helpful?