Пример #1
0
 /**
  * Drop the database that this object is currently connected to.
  * Use with caution.
  */
 public function dropSelectedDatabase()
 {
     $databaseName = $this->connector->getSelectedDatabase();
     if ($databaseName) {
         $this->connector->unloadDatabase();
         $this->schemaManager->dropDatabase($databaseName);
     }
 }
 protected function parseIndexSpec($name, $spec)
 {
     $spec = parent::parseIndexSpec($name, $spec);
     // Only allow index / unique index types
     if (!in_array($spec['type'], array('index', 'unique'))) {
         $spec['type'] = 'index';
     }
     return $spec;
 }