write transaction
A transaction that changes data, and so is routed to the leader of a cluster.
Example
A function that writes, run by execute_write.
python
def create_user(tx, email, encrypted, name):
return tx.run("""
CREATE (u:User {
userId: randomUuid(),
email: $email,
password: $encrypted,
name: $name
})
RETURN u
""",
email=email, encrypted=encrypted, name=name
).single()
with driver.session() as session:
result = session.execute_write(create_user, email, encrypted, name)execute_write sends the work to the leader, which is the one member of a cluster that accepts writes. The leader then copies the change to the others.
Lessons that use this term
The lesson and course links below open in a new tab.
2 lessons use this term. Results are ordered by term density.
Aura In Production2 mentions
- Checkpoint and Replan EventsMonitoring Database Healthrate naturally correlates with write transaction2 mentions
Building Neo4j Applications with TypeScript1 mention
- Executing QueriesNeo4j & TypeScripttransaction session.executeWrite() — executes a callback function in a write transaction1 mention