Commit message (Collapse) | Author | Age | Files | Lines | |
---|---|---|---|---|---|
* | Refactored transaction state into its own object. Each transaction creates a ↵ | wangjohn | 2013-01-21 | 1 | -5/+24 |
| | | | | new transaction state object upon initialization. | ||||
* | Created state for a transaction and added tests. | wangjohn | 2013-01-20 | 1 | -0/+12 |
| | |||||
* | Support for specifying transaction isolation level | Jon Leighton | 2012-09-21 | 1 | -9/+18 |
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If your database supports setting the isolation level for a transaction, you can set it like so: Post.transaction(isolation: :serializable) do # ... end Valid isolation levels are: * `:read_uncommitted` * `:read_committed` * `:repeatable_read` * `:serializable` You should consult the documentation for your database to understand the semantics of these different levels: * http://www.postgresql.org/docs/9.1/static/transaction-iso.html * https://dev.mysql.com/doc/refman/5.0/en/set-transaction.html An `ActiveRecord::TransactionIsolationError` will be raised if: * The adapter does not support setting the isolation level * You are joining an existing open transaction * You are creating a nested (savepoint) transaction The mysql, mysql2 and postgresql adapters support setting the transaction isolation level. However, support is disabled for mysql versions below 5, because they are affected by a bug (http://bugs.mysql.com/bug.php?id=39170) which means the isolation level gets persisted outside the transaction. | ||||
* | Fix test | Jon Leighton | 2012-09-15 | 1 | -13/+19 |
| | | | | Accidentally checked in commented test code. Fail. >_< | ||||
* | Move transaction joinability into the transaction object | Jon Leighton | 2012-09-15 | 1 | -1/+8 |
| | |||||
* | Alter the naming structure a bit | Jon Leighton | 2012-09-15 | 1 | -105/+103 |
| | |||||
* | Split Open into Real and Savepoint | Jon Leighton | 2012-09-15 | 1 | -25/+38 |
| | |||||
* | Don't do the rollback in #commit | Jon Leighton | 2012-09-15 | 1 | -17/+6 |
| | | | | | The caller needs to have knowledge of the rollback either way, so do it all in the caller (#transaction) | ||||
* | Store the transaction number in the transaction object | Jon Leighton | 2012-09-15 | 1 | -5/+24 |
| | | | | This avoids us having to manually increment and decrement it. | ||||
* | Start to tease out transaction handling into a state machine | Jon Leighton | 2012-09-15 | 1 | -0/+124 |