public function execute($writeConcern = 1)
    {
        $connection = Ioc::make(Pool::class)->getConnection();
        $manager = $connection->getRawManager();

        $namespace = $connection->defaultDatabase.'.'.$this->schema->collection;

        return $manager->executeBulkWrite(
            $namespace,
            $this->getBulkWrite(),
            ['writeConcern' => new WriteConcern($writeConcern)]
        );
    }
public function execute($writeConcern = 1)
    {
        $connection = Ioc::make(Pool::class)->getConnection();
        $manager = $connection->getRawManager();

        $namespace = $connection->defaultDatabase.'.'.$this->schema->collection;

        return $manager->executeBulkWrite(
            $namespace,
            $this->getBulkWrite(),
            ['writeConcern' => new WriteConcern($writeConcern)]
        );
    }
public function execute ( $ writeConcern = 1 ) { $ connection = Ioc :: make ( Pool :: class ) -> getConnection ( ) ; $ manager = $ connection -> getRawManager ( ) ; $ namespace = $ connection -> defaultDatabase . '.' . $ this -> schema -> collection ; return $ manager -> executeBulkWrite ( $ namespace , $ this -> getBulkWrite ( ) , [ 'writeConcern' => new WriteConcern ( $ writeConcern ) ] ) ; }
Execute the BulkWrite, using a connection from the Pool.
The collection is inferred from entity's collection name.

@param int $writeConcern

@return \MongoDB\Driver\WriteResult
Execute the BulkWrite using a connection from the Pool . The collection is inferred from entity s collection name .