code: private function executeQuery($query, $db)
      {
          if ($this->method === null) {
              return $query->one($db);
          }
          if (is_string($this->method)) {
              return call_user_func([$query, $this->method], $db);
          }
  
          return call_user_func($this->method, $query, $db);
      }
docs: Executes the query according to [[method]] specification.
  @param QueryInterface $query query to be executed.
  @param mixed $db connection.
  @return mixed query result.