/** * 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); } }
private function commit() { if (count($this->batch->getOperations())) { $this->client->commitBatch(); } else { $this->client->endBatch(); } $this->batch = null; }