根据 id 删除数据。

        :param id: 要删除的数据的 id
331773
def delete(self, id):
        
        self.conn.cursor().execute("DELETE FROM WeRoBot WHERE id=%s", (id, ))
        self.conn.commit()
614086
public final synchronized void removeId(long id)
	{
		if (tc.isEntryEnabled()) Tr.entry(tc, "removeId", new Long(id));

		_idMap.remove(id);

		if (tc.isEntryEnabled()) Tr.exit(tc, "removeId");
	}
132159
def g(self, id):
        
        if id not in self._m:
            if self.orig_ids:
                self._m[id] = id
                if self.warn:
                    try:
                        int(id)
                    except:
                        sys.stderr.write(
                            'Warning: ID "%s" is not an integer.\n' % id)
                        self.warn = False
            else:
                self._m[id] = self.index
                self.index += 1
        return self._m[id]
1319543
def get_item_with_id(self, uid):
        
        for item in self.get_items():
            if item.id == uid:
                return item

        return None
908716
public void setId(String id)
	{
		if (id == null || id.length() == 0)
			throw new IllegalArgumentException(
			"id required in setId");

		this.setId(Integer.valueOf(id));
	}
976635
def get(cls, id):
        

        # cached?
        if CACHE:
            if id in _cache['Prefix']:
                log.debug('cache hit for prefix %d' % id)
                return _cache['Prefix'][id]
            log.debug('cache miss for prefix %d' % id)

        try:
            prefix = Prefix.list({'id': id})[0]
        except IndexError:
            raise NipapNonExistentError('no prefix with ID ' + str(id) + ' found')

        _cache['Prefix'][id] = prefix
        return prefix
749045
def get(self, id):
        
        id = utils.lowerFirst(id)
        if id in self._settings:
            return self._settings[id]
        raise NotFound('Invalid setting id: %s' % id)
1364004
def get(self, id):
        
        with rconnect() as conn:
            if id is None:
                raise ValueError

            if isinstance(id, uuid.UUID):
                id = str(id)

            if type(id) != str and type(id) != unicode:
                raise ValueError

            try:
                query = self._base().get(id)
                log.debug(query)
                rv = query.run(conn)
            except ReqlOpFailedError as e:
                log.warn(e)
                raise
            except Exception as e:
                log.warn(e)
                raise
            if rv is not None:
                return self._model(rv)

            return None
934460
function(id) {
            for (var i in this.ids) {
                if (this.ids[i][id]) {
                    return this.ids[i][id];
                }
            }
            return null;
        }
534241
def delete(self, id):
        
        url = self._url('%s' % (id))
        return self.client.delete(url)
1305937
def get(self, id):
        
        try:
            if self.request.headers.get("Id"):
                object_ = yield self.client.find_one({self.request.headers.get("Id"): id})
            else:
                object_ = yield self.client.find_one_by_id(id)

            if object_:
                self.write(object_)
                return

            self.raise_error(404, "%s/%s not found" % (self.object_name, id))

        except InvalidId as ex:
            self.raise_error(400, message="Your ID is malformed: %s" % id)
        except Exception as ex:
            self.logger.error(ex)
            self.raise_error()
910864
def set(self, id, value):
        
        return self.kv.set(self.key_name(id), value)
482362
def filter_delete(self, id):
        
        id = self.__unpack_id(id)
        url = '/api/v1/filters/{0}'.format(str(id))
        self.__api_request('DELETE', url)
846184
public void document_id_DELETE(String id) throws IOException {
		String qPath = "/me/document/{id}";
		StringBuilder sb = path(qPath, id);
		exec(qPath, "DELETE", sb.toString(), null);
	}
630755
public T setId(int id) {
    Preconditions.checkState(this.id == null);
    this.id = id;
    return (T) this;
  }
226272
def query_by_id(self, id):
        
        return json.loads(self._get(UrlEncoded(str(id))).body.read().decode('utf-8'))
92043
def usable_id(cls, id):
        
        try:
            # id is maybe a hostname
            qry_id = cls.from_name(id)
            if not qry_id:
                # id is maybe an ip
                qry_id = cls.from_ip(id)
            if not qry_id:
                qry_id = cls.from_vhost(id)
        except Exception:
            qry_id = None

        if not qry_id:
            msg = 'unknown identifier %s' % id
            cls.error(msg)

        return qry_id