/** * Get the details list of keys for a table. * * @param string $table The name of the table. * * @return array An arry of the column specification for the table. * * @since 11.1 * * @throws Exception * @todo Move into database connector class. */ protected function getKeys($table) { if (empty($this->cache['keys'][$table])) { // Get the details columns information. $this->db->setQuery('SHOW KEYS FROM ' . $this->db->quoteName($table)); $this->cache['keys'][$table] = $this->db->loadObjectList(); // Check for a db error. if ($this->db->getErrorNum()) { throw new Exception($this->db->getErrorMsg()); } } return $this->cache['keys'][$table]; }