summaryrefslogtreecommitdiff
path: root/docs/transactions.rst
diff options
context:
space:
mode:
Diffstat (limited to 'docs/transactions.rst')
-rw-r--r--docs/transactions.rst20
1 files changed, 20 insertions, 0 deletions
diff --git a/docs/transactions.rst b/docs/transactions.rst
new file mode 100644
index 0000000..03a1e92
--- /dev/null
+++ b/docs/transactions.rst
@@ -0,0 +1,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 \ No newline at end of file