final protected function process(\SelectQueryInterface $select, Query $query)
    {
        if ($query->hasSortField()) {
            $select->orderBy(
                $query->getSortField(),
                Query::SORT_DESC === $query->getSortOrder() ? 'desc' : 'asc'
            );
        }
        $select->orderBy(
            'u.uid',
            Query::SORT_DESC === $query->getSortOrder() ? 'desc' : 'asc'
        );

        if ($searchstring = $query->getSearchString()) {
            $select->condition(
                'u.name',
                '%'.db_like($searchstring).'%',
                'LIKE'
            );
        }

        $this->applyFilters($select, $query);

        return $select /*->extend(DrupalPager::class)->setQuery($query) */;
    }
final protected function process(\SelectQueryInterface $select, Query $query)
    {
        if ($query->hasSortField()) {
            $select->orderBy(
                $query->getSortField(),
                Query::SORT_DESC === $query->getSortOrder() ? 'desc' : 'asc'
            );
        }
        $select->orderBy(
            'u.uid',
            Query::SORT_DESC === $query->getSortOrder() ? 'desc' : 'asc'
        );

        if ($searchstring = $query->getSearchString()) {
            $select->condition(
                'u.name',
                '%'.db_like($searchstring).'%',
                'LIKE'
            );
        }

        $this->applyFilters($select, $query);

        return $select /*->extend(DrupalPager::class)->setQuery($query) */;
    }
final protected function process ( \ SelectQueryInterface $ select , Query $ query ) { if ( $ query -> hasSortField ( ) ) { $ select -> orderBy ( $ query -> getSortField ( ) , Query :: SORT_DESC === $ query -> getSortOrder ( ) ? 'desc' : 'asc' ) ; } $ select -> orderBy ( 'u.uid' , Query :: SORT_DESC === $ query -> getSortOrder ( ) ? 'desc' : 'asc' ) ; if ( $ searchstring = $ query -> getSearchString ( ) ) { $ select -> condition ( 'u.name' , '%' . db_like ( $ searchstring ) . '%' , 'LIKE' ) ; } $ this -> applyFilters ( $ select , $ query ) ; return $ select /*->extend(DrupalPager::class)->setQuery($query) */ ; }
Implementors must set the users table with 'u' as alias, and call this
method for the datasource to work correctly.

@param \SelectQueryInterface $select
@param Query $query

@return \SelectQuery
It can be an extended query, so use this object.
Implementors must set the users table with u as alias and call this method for the datasource to work correctly .