Helper function that drops all local databases for every client.
555328
public static void clearallLocalDBs() {
    for (final Map.Entry<MongoClient, Boolean> entry : localInstances.entrySet()) {
      for (final String dbName : entry.getKey().listDatabaseNames()) {
        entry.getKey().getDatabase(dbName).drop();
      }
    }
  }
755820
def purge_all(delete=False, verbosity=0):
    """"""
    _location_purge_all(delete, verbosity)
    _storage_purge_all(delete, verbosity)
577651
def dropdb(force=False):
    """"""

    if force:
        logger.info(
            "Terminating any other connections to %s on %s",
            repr(DB["NAME"]),
            repr(DB["HOST"]),
        )
        kill_other_psql_sessions()

    logger.info("Dropping database %s", repr(DB["NAME"]))
    return shell('dropdb -U "{USER}" -h "{HOST}" "{NAME}"'.format(**DB))
257996
def close_db(fn):
    """"""
    @wraps(fn)
    def inner(*args, **kwargs):
        try:
            return fn(*args, **kwargs)
        finally:
            if not HUEY.immediate:
                close_old_connections()
    return inner
684175
async def _drop_databases(cls) -> None:
        
        if not cls._inited:
            raise ConfigurationError("You have to call .init() first before deleting schemas")
        for connection in cls._connections.values():
            await connection.close()
            await connection.db_delete()
        cls._connections = {}
        await cls._reset_apps()
134485
def _drop_tables(self):
        
        drop_cmd = "DROP TABLE IF EXISTS {};"
        for table in [self.subdomain_table, self.blocked_table]:
            cursor = self.conn.cursor()
            db_query_execute(cursor, drop_cmd.format(table), ())
300113
public function dropAllTables()
    {
        if ($this->connection->getDatabaseName() !== ':memory:') {
            return $this->refreshDatabaseFile();
        }

        $this->connection->select($this->grammar->compileEnableWriteableSchema());

        $this->connection->select($this->grammar->compileDropAllTables());

        $this->connection->select($this->grammar->compileDisableWriteableSchema());

        $this->connection->select($this->grammar->compileRebuild());
    }
20727
def drop(self, force=False):
        
        self.client.drop_database(self.name, force=force)
691757
private void dropCaches(final TSDB tsdb, final Channel chan) {
        LOG.warn(chan + " Dropping all in-memory caches.");
        tsdb.dropCaches();
    }
39874
def purge(self):
        '''
        
        '''
        for table_name in self._db.list_tables():
            self._db.flush(table_name)

        self._run_init_queries()
112049
def clear_db():
    """"""
    cursor = '0'
    while cursor != 0:
        cursor, keys = DB.scan(cursor, match='*', count=5000)
        if keys:
            DB.delete(*keys)
635919
def get_all(cls):
        

        api = Client.instance().api

        data = api.database.get()

        database_names = data['result']
        databases = []

        for name in database_names:
            db = Database(name=name, api=api)
            databases.append(db)

        return databases
928541
def DropTables(self):
    """"""

    rows, _ = self.ExecuteQuery(
        "SELECT table_name FROM information_schema.tables "
        "WHERE table_schema='%s'" % self.database_name)
    for row in rows:
      self.ExecuteQuery("DROP TABLE `%s`" % row["table_name"])
729676
def teardown_databases(self, old_config, options):
        
        if len(old_config) > 1:
            old_names, mirrors = old_config
        else:
            old_names = old_config
        for connection, old_name, destroy in old_names:
            if destroy:
                connection.creation.destroy_test_db(old_name, options['verbosity'])
390838
public function dropAllTables()
    {
        $tables = [];

        $excludedTables = ['spatial_ref_sys'];

        foreach ($this->getAllTables() as $row) {
            $row = (array) $row;

            $table = reset($row);

            if (! in_array($table, $excludedTables)) {
                $tables[] = $table;
            }
        }

        if (empty($tables)) {
            return;
        }

        $this->connection->statement(
            $this->grammar->compileDropAllTables($tables)
        );
    }
245137
def destroy(instances, opts=None):
    '''
    
    '''
    client = _get_client()
    if isinstance(opts, dict):
        client.opts.update(opts)
    info = client.destroy(instances)
    return info
75213
def drop_database(self, name, deleteData, cascade):
    
    self.send_drop_database(name, deleteData, cascade)
    self.recv_drop_database()