Remove one role
        
        Args:
            databaseName (str): Database Name
            roleName (RoleSpecs): role
            
        Keyword Args:
            collectionName (str): Collection
961800
def remove_role(self, databaseName, roleName, collectionName=None):
        
        role = {"databaseName" : databaseName,
                "roleName" : roleName}
        
        if collectionName:
            role["collectionName"] = collectionName
        
        if role in self.roles:
            self.roles.remove(role)
581843
def unbind(self, binding):
        
        
        username = self.backend.config.generate_binding_username(binding)
        
        try:
            self.backend.atlas.DatabaseUsers.delete_a_database_user(username)
        except ErrAtlasNotFound:
            # The user does not exist. This is not an issue because this is possible that we
            # removed it in a previous call that failed later on the broker.
            # This cover a manually deleted user case too.
            pass

        self.backend.storage.remove(binding)
639110
def delete_one(self, *args, **kwargs):
        
        result = self.collection.delete_one(*args, **kwargs)
        return result.raw_result
236478
def delete(self, key):
        """"""
        assert key, "A key must be supplied for delete operations"
        self._collection.remove(spec_or_id={'_id': key})
        LOG.debug("DB REMOVE: %s.%s", self.collection_name, key)
1187426
def collection_name(self, value):
        
        self._collection_name = value
        self.collection = self.db[value]
250588
public void deleteDB(String dbName) {
        assertNotEmpty(dbName, "dbName");
        delete(new DatabaseURIHelper(getBaseUri(), dbName).getDatabaseUri());

    }
862359
protected void deleteCollection() throws PolicyIndexException {

        // get root collection management service
        Collection rootCol;
        try {
            rootCol = DatabaseManager.getCollection(m_databaseURI + ROOT_COLLECTION_PATH ,m_user, m_password);
            CollectionManagementService mgtService = (CollectionManagementService) rootCol.getService("CollectionManagementService", "1.0");

            // delete the collection
            mgtService.removeCollection(m_collectionName);

            log.debug("Policy collection deleted");
        } catch (XMLDBException e) {
            throw new PolicyIndexException("Error deleting collection " + e.getMessage(), e);
        }
    }
840051
def delete_collection(db_name, collection_name, host='localhost', port=27017):
    """"""
    client = MongoClient("mongodb://%s:%d" % (host, port))
    client[db_name].drop_collection(collection_name)
488890
def _delete_collection(self, **kwargs):
        
        error_message = "The request must include \"requests_params\": {\"params\": \"options=<glob pattern>\"} as kwarg"
        try:
            if kwargs['requests_params']['params'].split('=')[0] != 'options':
                raise MissingRequiredRequestsParameter(error_message)
        except KeyError:
            raise

        requests_params = self._handle_requests_params(kwargs)
        delete_uri = self._meta_data['uri']
        session = self._meta_data['bigip']._meta_data['icr_session']

        session.delete(delete_uri, **requests_params)
964824
def db_remove(name, **connection_args):
    '''
    
    '''
    # check if db exists
    if not db_exists(name, **connection_args):
        log.info('DB \'%s\' does not exist', name)
        return False

    if name in ('mysql', 'information_scheme'):
        log.info('DB \'%s\' may not be removed', name)
        return False

    # db does exists, proceed
    dbc = _connect(**connection_args)
    if dbc is None:
        return False
    cur = dbc.cursor()
    s_name = quote_identifier(name)
    # identifiers cannot be used as values
    qry = 'DROP DATABASE {0};'.format(s_name)
    try:
        _execute(cur, qry)
    except MySQLdb.OperationalError as exc:
        err = 'MySQL Error {0}: {1}'.format(*exc.args)
        __context__['mysql.error'] = err
        log.error(err)
        return False

    if not db_exists(name, **connection_args):
        log.info('Database \'%s\' has been removed', name)
        return True

    log.info('Database \'%s\' has not been removed', name)
    return False
629468
def delete(self, roleId):
        """"""
        role = db.Role.find_one(Role.role_id == roleId)
        if not role:
            return self.make_response('No such role found', HTTP.NOT_FOUND)

        if role.name in ('User', 'Admin'):
            return self.make_response('Cannot delete the built-in roles', HTTP.BAD_REQUEST)

        db.session.delete(role)
        db.session.commit()
        auditlog(event='role.delete', actor=session['user'].username, data={'roleId': roleId})

        return self.make_response({
            'message': 'Role has been deleted',
            'roleId': roleId
        })
124193
def role_remove(role, **kwargs):
    '''
    
    '''
    try:
        conn = _get_connection(**kwargs)
        conn.autocommit(True)
        cur = conn.cursor()
        cur.execute('DROP ROLE {0}'.format(role))
        conn.autocommit(True)
        conn.close()
        return True
    except Exception as e:
        return 'Could not create the role: {0}'.format(e)
1309411
public ServerUpdater removeRolesFromUser(User user, Collection<Role> roles) {
        delegate.removeRolesFromUser(user, roles);
        return this;
    }
348172
def remove_role role
      raise ArgumentError, '#remove_role takes a single role String or Symbol as the argument' if !role || role.kind_of?(Array)
      remove_roles role
    end
120887
def remove_role_from_user(user, role):
    
    user = _query_to_user(user)
    role = _query_to_role(role)
    if click.confirm(f'Are you sure you want to remove {role!r} from {user!r}?'):
        user.roles.remove(role)
        user_manager.save(user, commit=True)
        click.echo(f'Successfully removed {role!r} from {user!r}')
    else:
        click.echo('Cancelled.')
314721
public boolean removePDatabase(PDatabase pDatabase)
    {
        Object strKey = pDatabase.getDatabaseKey();
        Object obj = m_htDBList.get(strKey);
        if (obj == null)
            return false;
        return (m_htDBList.remove(strKey) != null);
    }
356211
def delete(self, **kwargs):
        
        kwargs['stack'] = self.stack_mark(inspect.stack())
        
        return self.db_adapter(role='master').delete(**kwargs)