示例#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;
 }