summaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
authortag <[email protected]>2013-01-03 13:33:45 +0000
committerSimon Holywell <[email protected]>2013-01-03 13:33:45 +0000
commit5af9da5e44abbf71558813dfd3a0e8de9b5f38f3 (patch)
treeee4c572956f6ed52b67a475faf251699adb7bf91 /docs
parentd610dc89969bb3c006f38da8c96bf6484eca6104 (diff)
Add access to PDOStatement via get_last_statement
Diffstat (limited to 'docs')
-rw-r--r--docs/configuration.rst16
1 files changed, 16 insertions, 0 deletions
diff --git a/docs/configuration.rst b/docs/configuration.rst
index 698b67d..e6dc972 100644
--- a/docs/configuration.rst
+++ b/docs/configuration.rst
@@ -118,6 +118,21 @@ class constants defined by PDO. For example:
The default setting is ``PDO::ERRMODE_EXCEPTION``. For full details of
the error modes available, see `the PDO set attribute documentation`_.
+PDO object access
+^^^^^^^^^^^^^^^^^
+
+Should it ever be necessary, the PDO object used by Idiorm may be
+accessed directly through ``ORM::get_db()``, or set directly via
+``ORM::set_db()``. This should be an unusual occurance.
+
+After a statement has been executed by any means, such as ``::save()``
+or ``::raw_execute()``, the ``PDOStatement`` instance used may be
+accessed via ``ORM::get_last_statement()``. This may be useful in order
+to access ``PDOStatement::errorCode()``, if PDO exceptions are turned
+off, or to access the ``PDOStatement::rowCount()`` method, which returns
+differing results based on the underlying database. For more
+information, see the `PDOStatement documentation`_.
+
Identifier quote character
^^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -209,4 +224,5 @@ Warnings and gotchas
.. _PDO documentation: http://php.net/manual/en/pdo.construct.php
.. _the PDO documentation: http://www.php.net/manual/en/pdo.construct.php
.. _the PDO set attribute documentation: http://uk2.php.net/manual/en/pdo.setattribute.php
+.. _PDOStatement documentation: http://www.php.net/manual/en/class.pdostatement.php
.. _Memcached: http://www.memcached.org/ \ No newline at end of file