public function deleteUrlAliasesWithoutParent(): int
    {
        $existingAliasesQuery = $this->getAllUrlAliasesQuery();

        $query = $this->connection->createQueryBuilder();
        $query
            ->delete($this->table)
            ->where(
                $query->expr()->neq(
                    'parent',
                    $query->createPositionalParameter(0, \PDO::PARAM_INT)
                )
            )
            ->andWhere(
                $query->expr()->notIn(
                    'parent',
                    $existingAliasesQuery
                )
            )
        ;

        return $query->execute();
    }
public function deleteUrlAliasesWithoutParent(): int
    {
        $existingAliasesQuery = $this->getAllUrlAliasesQuery();

        $query = $this->connection->createQueryBuilder();
        $query
            ->delete($this->table)
            ->where(
                $query->expr()->neq(
                    'parent',
                    $query->createPositionalParameter(0, \PDO::PARAM_INT)
                )
            )
            ->andWhere(
                $query->expr()->notIn(
                    'parent',
                    $existingAliasesQuery
                )
            )
        ;

        return $query->execute();
    }
public function deleteUrlAliasesWithoutParent ( ) : int { $ existingAliasesQuery = $ this -> getAllUrlAliasesQuery ( ) ; $ query = $ this -> connection -> createQueryBuilder ( ) ; $ query -> delete ( $ this -> table ) -> where ( $ query -> expr ( ) -> neq ( 'parent' , $ query -> createPositionalParameter ( 0 , \ PDO :: PARAM_INT ) ) ) -> andWhere ( $ query -> expr ( ) -> notIn ( 'parent' , $ existingAliasesQuery ) ) ; return $ query -> execute ( ) ; }
Delete URL aliases pointing to non-existent parent nodes.

@return int Number of affected rows.
Delete URL aliases pointing to non - existent parent nodes .