예제 #1
0
 /**
  * Commit the started batch operation.
  *
  * @return boolean
  *
  * @throws  \Vinelab\NeoEloquent\QueryException If no open batch to commit.
  */
 public function commitBatch()
 {
     try {
         return $this->client->commitBatch();
     } catch (\Exception $e) {
         throw new QueryException('Error committing batch operation.', array(), $e);
     }
 }
예제 #2
0
 private function commit()
 {
     if (count($this->batch->getOperations())) {
         $this->client->commitBatch();
     } else {
         $this->client->endBatch();
     }
     $this->batch = null;
 }