From 5af9da5e44abbf71558813dfd3a0e8de9b5f38f3 Mon Sep 17 00:00:00 2001 From: tag Date: Thu, 3 Jan 2013 13:33:45 +0000 Subject: Add access to PDOStatement via get_last_statement --- docs/configuration.rst | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'docs/configuration.rst') 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 -- cgit v1.2.3