public function batchDelete($expression)
    {
        // remove
        $result = $this->getMongoCollection()->remove(
            Expression::convertToArray($expression)
        );

        // check result
        if (true !== $result && $result['ok'] != 1) {
            throw new Exception('Error removing documents from collection: ' . $result['err']);
        }

        return $this;
    }
public function batchDelete($expression)
    {
        // remove
        $result = $this->getMongoCollection()->remove(
            Expression::convertToArray($expression)
        );

        // check result
        if (true !== $result && $result['ok'] != 1) {
            throw new Exception('Error removing documents from collection: ' . $result['err']);
        }

        return $this;
    }
public function batchDelete ( $ expression ) { // remove $ result = $ this -> getMongoCollection ( ) -> remove ( Expression :: convertToArray ( $ expression ) ) ; // check result if ( true !== $ result && $ result [ 'ok' ] != 1 ) { throw new Exception ( 'Error removing documents from collection: ' . $ result [ 'err' ] ) ; } return $ this ; }
Delete documents by expression

@param Expression|callable|array $expression

@return Collection

@throws Exception
Delete documents by expression