Class: Isomorfeus::Hamster::Transaction
- Inherits:
-
Object
- Object
- Isomorfeus::Hamster::Transaction
- Defined in:
- ext/isomorfeus_hamster_ext/isomorfeus_hamster.c
Instance Method Summary collapse
-
#abort ⇒ Object
Abort a transaction in process.
-
#commit ⇒ Object
Commit a transaction in process.
- #env ⇒ Environment
Instance Method Details
#abort ⇒ Object
After aborting a transaction, no further database operations should be done in the block. Any cursors created in the context of the transaction will no longer be valid.
Abort a transaction in process. Any subtransactions of this transaction will be aborted as well.
105 106 107 108 |
# File 'ext/isomorfeus_hamster_ext/isomorfeus_hamster.c', line 105 static VALUE transaction_abort(VALUE self) { transaction_finish(self, 0); return Qnil; } |
#commit ⇒ Object
After committing a transaction, no further database operations should be done in the block. Any cursors created in the context of the transaction will no longer be valid.
Commit a transaction in process. Any subtransactions of this transaction will be committed as well.
One does not normally need to call commit explicitly; a commit is performed automatically when the block supplied to Environment#transaction exits normally.
78 79 80 81 |
# File 'ext/isomorfeus_hamster_ext/isomorfeus_hamster.c', line 78 static VALUE transaction_commit(VALUE self) { transaction_finish(self, 1); return Qnil; } |
#env ⇒ Environment
119 120 121 122 |
# File 'ext/isomorfeus_hamster_ext/isomorfeus_hamster.c', line 119 static VALUE transaction_env(VALUE self) { TRANSACTION(self, transaction); return transaction->env; } |