private function DropViewSQL($_name, $_dict = '') { if (empty($_dict)) { $_dict = $this->setDictionarySchema(); } // DropViewSQL not yet implemented // return $dict->DropViewSQL($this->getViewname($_name)); $viewname = $this->getViewname($_name, $_dict); $cols = Fields::getFields_static($viewname); if (empty($cols)) { return array(); } return array('drop view ' . $viewname); }
public static function getFields($tablename, $cache_results = TRUE) { $cached_fields = FALSE; $cache_id = array('table_fields', $tablename); // we might not want to hit the cache if (MEMCACHED_ENABLED && $cache_results === TRUE) { // instanciate the cache and get the cache value $cache = Cache::Instance(); $cached_fields = $cache->get($cache_id); } // go and fetch the data and populate the cache if ($cached_fields === FALSE) { $fields = Fields::getFields_static($tablename); $return = array(); if (is_array($fields)) { foreach ($fields as $field) { $return[$field->name] = clone $field; } } else { $return = FALSE; } if (MEMCACHED_ENABLED && $return !== FALSE && $cache_results === TRUE) { $cache->add($cache_id, $return); } } else { $return = $cached_fields; } return $return; }