dropDatabase

@param bool $ifExists

@return  static
962513
public function drop($ifExists = false)
    {
        $query = MysqlGrammar::dropDatabase($this->name, $ifExists);

        $this->db->setQuery($query)->execute();

        return $this;
    }
247879
def dropdb(self, name):
        '''
        
        '''
        if self.readonly:
            raise s_exc.IsReadOnly()

        while True:
            try:
                if not self.dbexists(name):
                    return
                db = self.initdb(name)
                self.dirty = True
                self.xact.drop(db.db, delete=True)
                self.forcecommit()
                return

            except lmdb.MapFullError:
                self._handle_mapfull()
1055286
public function create($schema, $ifNotExists = true, $options = [])
    {
        if ($ifNotExists && $this->db->getDatabase(null, true)->tableExists($this->getName())) {
            return $this;
        }

        $defaultOptions = [
            'auto_increment' => 1
        ];

        $options = array_merge($defaultOptions, $options);
        $schema = $this->callSchema($schema);
        $columns = [];
        $comments = [];
        $primary = [];

        foreach ($schema->getColumns() as $column) {
            $column = $this->prepareColumn($column);

            $columns[$column->getName()] = SqlsrvGrammar::build(
                $column->getType() . $column->getLength(),
                $column->getAllowNull() ? null : 'NOT NULL',
                $column->getAutoIncrement() ? 'identity' : null,
                $column->getDefault() ? 'DEFAULT ' . $this->db->quote($column->getDefault()) : null
            );

            // Comment
            if ($column->getComment()) {
                $comments[$column->getName()] = $column->getComment();
            }

            // Primary
            if ($column->isPrimary()) {
                $primary[] = $column->getName();
            }
        }

        $keys = [];
        $keyComments = [];

        foreach ($schema->getIndexes() as $index) {
            if ($index->getType() === Key::TYPE_PRIMARY) {
                $primary = array_merge($primary, $index->getColumns());
            } else {
                $keys[$index->getName()] = [
                    'type' => strtoupper($index->getType()),
                    'name' => $index->getName(),
                    'columns' => $index->getColumns(),
                ];

                if ($index->getComment()) {
                    $keyComments[$index->getName()] = $index->getComment();
                }
            }
        }

        $options['comments'] = $comments;
        $options['key_comments'] = $keyComments;

        $query = SqlsrvGrammar::createTable(
            $this->getName(),
            $columns,
            $primary,
            $keys,
            false
        );

        $this->db->execute($query);
        $query = '';

        $comments = $options['comments'] ?? [];

        // Comments
        foreach ($comments as $name => $comment) {
            $query .= ";\n" . SqlsrvGrammar::comment(
                'COLUMN',
                $this->db->replacePrefix($this->getName()),
                $name,
                $comment
            );
        }

        if ($query) {
            $this->db->execute($query);
        }

        return $this->reset();
    }
864597
public function save($schema, $ifNotExists = true, $options = [])
    {
        $schema = $this->callSchema($schema);

        if ($this->exists()) {
            $this->update($schema);
        } else {
            $this->create($schema, $ifNotExists, $options);
        }

        $database = $this->db->getDatabase();
        $database->reset();

        return $this->reset();
    }
391057
public function create($ifNotExists = false, $charset = 'utf8', $collate = 'utf8_unicode_ci')
    {
        $query = MysqlGrammar::createDatabase($this->name, $ifNotExists, $charset, $collate);

        $this->db->setQuery($query)->execute();

        return $this;
    }
778319
public function delete(string $from, $wheres, array $options = [])
    {
        if (!$wheres) {
            throw new \RuntimeException('Safety considerations, where conditions can not be empty');
        }

        list($where, $bindings) = $this->handleWheres($wheres);

        $options['from'] = $this->qn($from);
        $options['where'] = $where;

        $statement = $this->compileDelete($options);

        if (isset($options['dumpSql'])) {
            return [$statement, $bindings];
        }

        return $this->fetchAffected($statement, $bindings);
    }
1125943
public function delete($t, $conditions = array()){
		if(is_array($t)){
			$conditions = $t;
		}elseif(is_string($t)){
			$this->table($t);
		}
		if(!empty($conditions)){
			$this->where($conditions);
		}
		$this->_sql = $this->getDeleteStatement();
		return $this;
	}
1345639
final public function drop($table)
    {
        $table = $this->getTablePrefixed($table);

        $sql = sprintf('DROP TABLE `%s`;', $table);

        return $this->executeSqlQuery($sql);
    }
85740
public function deleteDataWhere( $where = array(), $debug = 1 )
	{
		$conditions	= $this->getConditionQuery( $where );
		if( $conditions )
		{
			$query	= "DELETE FROM ".$this->getTableName()." WHERE ".$conditions;
			$result	= $this->dbc->Execute( $query, $debug );
			$this->defocus();
			return $result;
		}
	}
1139385
public function deleteBy($conditions = [])
    {
        if (count($conditions)) {
            if (method_exists($this, 'beforeDelete')) {
                $this->beforeDelete();
            }

            if (method_exists($this, 'beforeDelete')) {
                $this->beforeDelete();
            }

            if ($this->qb->table($this->table)->limit(1)->delete($conditions)) {
                if (method_exists($this, 'afterDelete')) {
                    return $this->afterDelete();
                }

                return $this->db->getAffectedRows();
            }
        }

        return false;
    }
273536
public function uninstallDatabaseFor(array $metadatas)
    {
        if (count($metadatas) > 0) {
            $em = $this->getEntityManager();
            $conn = $em->getConnection();
            $sm = $conn->getSchemaManager();
            $cmf = $em->getMetadataFactory();
            $tool = new \Doctrine\ORM\Tools\SchemaTool($em);

            $newSchema = $tool->getSchemaFromMetadata($metadatas);

            // We'll let Doctrine resolve the correct drop order for the tables
            // because of which we use the schema migration method to drop the
            // tables. By letting Doctrine resolve the drop order we avoid
            // DB server constraint violation errors (e.g. in MySQL).
            $fromSchema = $sm->createSchema();
            $toSchema = clone $fromSchema;
            foreach ($newSchema->getTables() as $newTable) {
                if ($toSchema->hasTable($newTable->getName())) {
                    $toSchema->dropTable($newTable->getName());
                }
            }
            $sqls = $fromSchema->getMigrateToSql($toSchema, $conn->getDatabasePlatform());

            if (count($sqls) > 0) {
                foreach ($sqls as $sql) {
                    $conn->executeQuery($sql);
                }

                return true;
            }
        }

        return false;
    }
1010152
protected function sqlDelete(string $extraWhereClause): string
    {
        // get the conditions to alter the current record
        $conditions = $this->sqlWhereConditions($extraWhereClause);
        // if no conditions then log error and return false
        if (! count($conditions)) {
            throw new \LogicException('Recordset: The current record does not have any conditions to delete');
        }
        return 'DELETE'
            . ' FROM ' . $this->dbal->sqlTableEscape($this->entity)
            . ' WHERE ' . implode(' AND ', $conditions)
            . ';';
    }
422906
public function DropDatabase(\Google\Cloud\Spanner\Admin\Database\V1\DropDatabaseRequest $argument,
      $metadata = [], $options = []) {
        return $this->_simpleRequest('/google.spanner.admin.database.v1.DatabaseAdmin/DropDatabase',
        $argument,
        ['\Google\Protobuf\GPBEmpty', 'decode'],
        $metadata, $options);
    }
503012
private function getDroppedTables(Schema $oldSchema, Schema $newSchema)
    {
        $droppedTables = array();

        foreach ($oldSchema->getTables() as $table) {
            if (!$newSchema->hasTable($table->getName())) {
                $droppedTables[] = $table;
            }
        }

        return $droppedTables;
    }
315763
protected function drop()
    {
        if ($this->tableExist($this->tableName)) {
            $this->dbHandler->exec('DROP TABLE ' . $this->tableName);
        }
    }
706555
public function create($ifNotExists = false, $charset = 'utf8')
    {
        if ($ifNotExists && $this->exists()) {
            return $this;
        }

        $query = PostgresqlGrammar::createDatabase($this->name, $charset);

        $this->db->setQuery($query)->execute();

        return $this;
    }
831325
public function dropDatabase($database, $optParams = array())
  {
    $params = array('database' => $database);
    $params = array_merge($params, $optParams);
    return $this->call('dropDatabase', array($params), "Google_Service_Spanner_SpannerEmpty");
  }