Bolt.Sips v0.1.8 Bolt.Sips.Transaction
This module is the main implementation for running Cypher commands using transactions.
Example:
test "execute statements in an open transaction" do
conn = Bolt.Sips.begin(Bolt.Sips.conn)
book = Bolt.Sips.query!(conn, "CREATE (b:Book {title: "The Game Of Trolls"}) return b") |> List.first
assert %{"b" => g_o_t} = book
assert g_o_t.properties["title"] == "The Game Of Trolls"
Bolt.Sips.rollback(conn)
books = Bolt.Sips.query!(conn, "MATCH (b:Book {title: "The Game Of Trolls"}) return b")
assert length(books) == 0
end
Summary
Functions
begin a new transaction
given you have an open transaction, you can use this to send a commit request
given that you have an open transaction, you can send a rollback request. The server will rollback the transaction. Any further statements trying to run in this transaction will fail immediately
Functions
given you have an open transaction, you can use this to send a commit request