ZF-4658: Zend_Db_Statement_Oracle::fetchColumn() - behaviour inconsistent with base method definition
Description
According to the docs for the fetchColumn() method in the abstract Zend_Db_Statement, it will return a value, or false if there is no value to return.
All child classes either inherit this method, or if they override it (eg. in Zend_Db_Statement_Pdo), they retain the same behaviour: If there are no more rows in the result set, return FALSE.
However, Zend_Db_Statement_Oracle behaves differently. If there are no more rows in the result set, it throws a Zend_Db_Statement_Oracle_Exception. This inconsistency makes it impossible to write code that is database-independent.
The problem also affects Adapter::fetchOne(), which internally calls Statement::fetchColumn() to do its work.
Comments
Posted by Mickael Perraud (mikaelkael) on 2009-01-19T14:33:34.000+0000
Fixed with SVN13702
Posted by old of Satoru Yoshida (yoshida@zend.co.jp) on 2009-04-01T05:22:08.000+0000
correct fix version