Details
-
Type:
Improvement
-
Status:
Resolved
-
Priority:
Major
-
Resolution: Won't Fix
-
Affects Version/s: 1.5.1
-
Fix Version/s: 1.8.0
-
Component/s: Zend_Db_Select
-
Labels:None
-
Fix Version Priority:Should Have
Description
At the moment it's not possible to get $_info data from a Zend_Db_Table_Select instance. A possible solution could be a getInfo() method, which is a slightly modified copy of the getPart() method:
/** * Get part of the structured information for the currect query. * * @param string $part * @return mixed * @throws Zend_Db_Select_Exception */ public function getInfo($info = null) { if ($info === null) { return $this->_info; } $info = strtolower($info); if (!array_key_exists($info, $this->_info)) { require_once 'Zend/Db/Select/Exception.php'; throw new Zend_Db_Select_Exception("Invalid Select part '$info'"); } return $this->_info[$info]; }
The idea of fusion getInfo() and getPart() together crossed my mind as well, but the data in $_info is too different. However, there is some info in $_info that does/could belong to $_parts, such as the source table name. Something like getTableName() method for both Db_Select and Db_Table_Select would be nice in this case, because this would provide a generic interface to this data.
Issue Links
| This issue is related to: | ||||
| ZF-3239 | 'From' table not available in $_parts in Zend_Db_Table_Select |
|
|
|
Please evaluate and fix/categorize as necessary.