Skip to content

Latest commit

 

History

History
46 lines (31 loc) · 1.13 KB

Console-Command-Rollback.md

File metadata and controls

46 lines (31 loc) · 1.13 KB

Console - ROLLBACK

OrientDB supports Transactions. Once a transaction is BEGIN you can abort changes in transactions by using the ROLLBACK command.

Syntax

ROLLBACK

See also

Example

orientdb> BEGIN
Transaction 1 is running

orientdb> BEGIN
Error: an active transaction is currently open (id=1). Commit or rollback before starting a new one.

orientdb> INSERT INTO account (name) VALUES ('tx test')

Inserted record 'Account#9:-2{name:tx test} v0' in 0,004000 sec(s).

orientdb> SELECT FROM account WHERE name LIKE 'tx%'

---+---------+--------------------
  #| RID     |name
---+---------+--------------------
  0|    #9:-2|tx test
---+---------+--------------------

1 item(s) found. Query executed in 0.076 sec(s).

orientdb> ROLLBACK
Transaction 1 has been rollbacked in 4ms

orientdb> SELECT FROM account WHERE name LIKE 'tx%'

0 item(s) found. Query executed in 0.037 sec(s).