views_query_alter add condition This looks appropriate for D7, but add_where doesn't exist in D8. What should I use?
/**
 * Filter out the current node from the view query
 */
if ($view-&gt;id() == 'videos') {
    $node = \Drupal::routeMatch()-&gt;getParameter('node');
    if ($node) {
        $query-&gt;add_where(0, $node-&gt;ID(), 'nid', 'NOT IN');
    }
}
You try code:
 use Drupal\views\ViewExecutable;
 use Drupal\views\Plugin\views\query\QueryPluginBase;
....

   /**
    * Implements hook_views_query_alter().
    */
    function mymodule_views_query_alter(ViewExecutable $view, QueryPluginBase $query) {
     $query-&gt;addWhere(0, 'node__field_data.nid', [1,2,3], 'IN');
    }