summaryrefslogtreecommitdiff
path: root/docs/transactions.rst
blob: 03a1e92502312b9c691e93c12a004e6340a16ee7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
Transactions
============

Idiorm doesn’t supply any extra methods to deal with transactions, but
it’s very easy to use PDO’s built-in methods:

::

    // Start a transaction
    ORM::get_db()->beginTransaction();

    // Commit a transaction
    ORM::get_db()->commit();

    // Roll back a transaction
    ORM::get_db()->rollBack();

For more details, see `the PDO documentation on Transactions`_.

.. _the PDO documentation on Transactions: http://www.php.net/manual/en/pdo.transactions.php