\Everyman\Neo4jBatch

A set of operations expected to succeed (or fail) atomically

Summary

Methods
Properties
Constants
__construct()
addToIndex()
commit()
delete()
getClient()
getOperations()
removeFromIndex()
reserve()
save()
No public properties found
No constants found
addOperation()
nextId()
$client
$committed
$operations
$matches
N/A
No private methods found
No private properties found
N/A

Properties

$client

$client : 

Type

$committed

$committed : 

Type

$operations

$operations : 

Type

$matches

$matches : 

Type

Methods

__construct()

__construct(\Everyman\Neo4j\Client $client)

Build the batch and set its client

Parameters

\Everyman\Neo4j\Client $client

addToIndex()

addToIndex(\Everyman\Neo4j\Index $index, \Everyman\Neo4j\PropertyContainer $entity, string $key, string $value) : integer

Add the given entity to the given index with the given key/value

Parameters

\Everyman\Neo4j\Index $index
\Everyman\Neo4j\PropertyContainer $entity
string $key
string $value

Returns

integer

commit()

commit() : boolean

Commit the batch to the server

Returns

boolean

delete()

delete(\Everyman\Neo4j\PropertyContainer $entity) : integer

Add an entity to the batch to delete

Parameters

\Everyman\Neo4j\PropertyContainer $entity

Returns

integer

getOperations()

getOperations() : array

Return the list of operations in this batch

Returns

array

removeFromIndex()

removeFromIndex(\Everyman\Neo4j\Index $index, \Everyman\Neo4j\PropertyContainer $entity, string $key, string $value) : integer

Remove the given entity from the given index with the given key/value

Parameters

\Everyman\Neo4j\Index $index
\Everyman\Neo4j\PropertyContainer $entity
string $key
string $value

Returns

integer

reserve()

reserve(integer $opId) : mixed

Reserve an operation to prevent it from being double-committed Once an operation has been reserved, future reserve calls will return false, indicating it has already been reserved.

This is mostly useful during commit to prevent an operation being sent twice

Parameters

integer $opId

Returns

mixed —

array operation if not yet reserved, false otherwise

save()

save(\Everyman\Neo4j\PropertyContainer $entity) : integer

Add an entity to the batch to save

Parameters

\Everyman\Neo4j\PropertyContainer $entity

Returns

integer

addOperation()

addOperation(\Everyman\Neo4j\Batch\Operation $operation) : integer

Add an operation to the batch

Parameters

\Everyman\Neo4j\Batch\Operation $operation

Returns

integer —

operation index

nextId()

nextId() : integer

Get the next unused id

Returns

integer