Exemplo n.º 1
0
 private function _getInfosSequence($table)
 {
     $sql = "SELECT sequence_name" . PHP_EOL . "  FROM information_schema.sequences" . PHP_EOL . "WHERE sequence_catalog = :p_schema" . PHP_EOL . "  AND sequence_name LIKE '" . $table . "%'";
     $params = array(':p_schema' => $this->_schemacible);
     $this->_oVue->setRequete($sql, $params);
     $sequence = $this->_oVue->fetchOne();
     return $sequence;
 }
Exemplo n.º 2
0
 public function getViewTables($viewName)
 {
     $sql = "SELECT " . "  view_definition " . "FROM " . $this->_metaschema . ".VIEWS " . "WHERE table_schema = :p_table_schema " . "  AND table_name   = :p_view_name";
     $params = array(':p_table_schema' => $this->_schemacible, ':p_view_name' => $viewName);
     $this->_oVue->setRequete($sql, $params);
     $definition = $this->_oVue->fetchOne();
     if (is_null($this->_oSelectTablesName)) {
         $this->_oSelectTablesName = new selectTablesNames();
     }
     $this->_oSelectTablesName->setNewQuery($definition);
     $aTables = $this->_oSelectTablesName->getTables(true);
     return $aTables;
 }