Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help


search: keywords: ['java', 'odatabasedocument', 'gettransaction']

ODatabaseDocument - getTransaction()

Retrieves the current transaction.

Fetching Transactions

OrientDB is ACID compliant and supports the use of transactions. Internally, transactions are tracked using an OTransaction instance. Using this method, you can retrieve the active OTransaction instance. In the event that no transaction is currently active on the database, this method returns an OTransactionNoTx instance.

Syntax

OTransaction ODatabaseDocument().getTransaction()

Return Value

This method returns an OTransaction implementation.