Syntactical sugar for making DELETE requests via the API.
 @see #execute
349973
def delete(path: nil, payload: nil, headers: {}, query: {})
      execute(method: :delete, path: path, headers: headers, query: query, payload: payload)
    end
952929
@Override
  public void execute(final TSDB tsdb, final HttpQuery query) 
    throws IOException {
    
    // only accept GET/POST/DELETE
    if (query.method() != HttpMethod.GET && query.method() != HttpMethod.POST &&
        query.method() != HttpMethod.DELETE) {
      throw new BadRequestException(HttpResponseStatus.METHOD_NOT_ALLOWED, 
          "Method not allowed", "The HTTP method [" + query.method().getName() +
          "] is not permitted for this endpoint");
    }
    if (query.method() == HttpMethod.DELETE && 
        !tsdb.getConfig().getBoolean("tsd.http.query.allow_delete")) {
      throw new BadRequestException(HttpResponseStatus.BAD_REQUEST,
               "Bad request",
               "Deleting data is not enabled (tsd.http.query.allow_delete=false)");
    }
    
    final String[] uri = query.explodeAPIPath();
    final String endpoint = uri.length > 1 ? uri[1] : ""; 
    
    if (endpoint.toLowerCase().equals("last")) {
      handleLastDataPointQuery(tsdb, query);
    } else if (endpoint.toLowerCase().equals("gexp")){
      handleQuery(tsdb, query, true);
    } else if (endpoint.toLowerCase().equals("exp")) {
      handleExpressionQuery(tsdb, query);
      return;
    } else {
      handleQuery(tsdb, query, false);
    }
  }
1019839
public ApiResponse<MetadataEnvelope> deleteServerPropertiesWithHttpInfo(String did) throws ApiException {
        com.squareup.okhttp.Call call = deleteServerPropertiesValidateBeforeCall(did, null, null);
        Type localVarReturnType = new TypeToken<MetadataEnvelope>(){}.getType();
        return apiClient.execute(call, localVarReturnType);
    }
147607
def delete(sql_params = "", *bindvars)
      delete_sql = "DELETE FROM \"#{@schema_name}\".\"#{@table_name}\" "
      case sql_params
      when String
        delete_sql << sql_params
      when Hash
        raise ArgumentError, "Cannot specify bind variables when passing WHERE conditions as Hash" unless bindvars.empty?
        where_sqls = []
        sql_params.each do |k, v|
          where_sqls << "#{k} = :#{k}"
          bindvars << v
        end
        delete_sql << "WHERE " << where_sqls.join(" AND ") unless where_sqls.empty?
      else
        raise ArgumentError, "Only String or Hash can be provided as SQL condition argument"
      end
      @schema.execute(delete_sql, *bindvars)
    end
10855
void executeBulkDelete(final TSDB tsdb, HttpQuery query) {
    try {
      final AnnotationBulkDelete delete_request;
      if (query.hasContent()) {
        delete_request = query.serializer().parseAnnotationBulkDeleteV1();
      } else {
        delete_request = parseBulkDeleteQS(query);
      }
      
      // validate the start time on the string. Users could request a timestamp of
      // 0 to delete all annotations, BUT we don't want them doing that accidentally
      if (delete_request.start_time == null || delete_request.start_time.isEmpty()) {
        throw new BadRequestException(HttpResponseStatus.BAD_REQUEST, 
            "Missing the start time value");
      }
      if (!delete_request.global && 
          (delete_request.tsuids == null || delete_request.tsuids.isEmpty())) {
        throw new BadRequestException(HttpResponseStatus.BAD_REQUEST, 
            "Missing the TSUIDs or global annotations flag");
      }
      
      final int pre_allocate = delete_request.tsuids != null ? 
          delete_request.tsuids.size() + 1 : 1;
      List<Deferred<Integer>> deletes = new ArrayList<Deferred<Integer>>(pre_allocate);
      if (delete_request.global) {
        deletes.add(Annotation.deleteRange(tsdb, null, 
            delete_request.getStartTime(), delete_request.getEndTime()));
      }
      if (delete_request.tsuids != null) {
        for (String tsuid : delete_request.tsuids) {
          deletes.add(Annotation.deleteRange(tsdb, UniqueId.stringToUid(tsuid), 
              delete_request.getStartTime(), delete_request.getEndTime()));
        }
      }
      
      Deferred.group(deletes).joinUninterruptibly();
      delete_request.total_deleted = 0; // just in case the caller set it
      for (Deferred<Integer> count : deletes) {
        delete_request.total_deleted += count.joinUninterruptibly();
      }
      query.sendReply(query.serializer()
          .formatAnnotationBulkDeleteV1(delete_request));
    } catch (BadRequestException e) {
      throw e;
    } catch (IllegalArgumentException e) {
      throw new BadRequestException(e);
    } catch (RuntimeException e) {
      throw new BadRequestException(e);
    } catch (Exception e) {
      throw new RuntimeException("Shouldn't be here", e);
    }
  }
445526
def delete(table, where=(), **kwargs):
    """"""
    where = dict(where, **kwargs).items()
    sql, args = makeSQL("DELETE", table, where=where)
    return execute(sql, args).rowcount
1057329
function execute(req, res) {
  // unwatch keys, clear references,
  // and destroy the transaction reference on the conn
  // and send the reply
  req.conn.transaction.destroy(req, res, null, Constants.OK);
}
397540
def destroy(self, request, *args, **kwargs):
        
        obj = self.get_object()
        user = request.user

        if strtobool(request.query_params.get('delete_content', 'false')):
            for entity in obj.entity_set.all():
                if user.has_perm('edit_entity', entity):
                    entity.delete()

            for data in obj.data.all():
                if user.has_perm('edit_data', data):
                    data.delete()

        return super().destroy(request, *args, **kwargs)
22411
function destroy() {
			var act = new NobleMachine(function() {
				if (me.onDestroy) {
					var preact = me.onDestroy();
					if (preact && preact.start instanceof Function) {
						act.toNext(preact)
						return;
					}
				}
			});

			act.next(function() {
				var sql = "DELETE FROM " + model.table
						+ " WHERE `" + model.primary + "` = " + me[model.primary];

				act.toNext(db_query(sql));
			});

			act.next(function() {
				logger.log("Successfully deleted `" + model.ident + "` record `" + me[model.primary] + "`");

				for (var param in me) {
					delete me[param];	
				}
			});

			act.error(function(err) {
				logger.error("Error deleting `" + model.ident + "` record: " + JSON.stringify(err));
				act.emitError(err);
			});

			return act;
		}
1039692
private void executeDeletes()
        throws EFapsException
    {
        final AbstractDelete delete = (AbstractDelete) runnable;
        for (final Instance instance : delete.getInstances()) {
            final Context context = Context.getThreadContext();
            final ConnectionResource con = context.getConnectionResource();
            // first remove the storeresource, because the information needed
            // from the general
            // instance to actually delete will be removed in the second step
            Resource storeRsrc = null;
            try {
                if (instance.getType().hasStore()) {
                    storeRsrc = context.getStoreResource(instance, Resource.StoreEvent.DELETE);
                    storeRsrc.delete();
                }
            } finally {
                if (storeRsrc != null && storeRsrc.isOpened()) {
                }
            }
            try {
                final List<DeleteDefintion> defs = new ArrayList<>();
                defs.addAll(GeneralInstance.getDeleteDefintion(instance, con));
                final SQLTable mainTable = instance.getType().getMainTable();
                for (final SQLTable curTable : instance.getType().getTables()) {
                    if (!curTable.equals(mainTable) && !curTable.isReadOnly()) {
                        defs.add(new DeleteDefintion(curTable.getSqlTable(), curTable.getSqlColId(), instance.getId()));
                    }
                }
                defs.add(new DeleteDefintion(mainTable.getSqlTable(), mainTable.getSqlColId(), instance.getId()));
                final SQLDelete sqlDelete = Context.getDbType().newDelete(defs.toArray(new DeleteDefintion[defs
                                .size()]));
                sqlDelete.execute(con);
                AccessCache.registerUpdate(instance);
                Queue.registerUpdate(instance);
            } catch (final SQLException e) {
                throw new EFapsException(getClass(), "executeWithoutAccessCheck.SQLException", e, instance);
            }
        }
    }
935398
def delete *where
    sql, *binds = SQLHelper.delete(:table => name, :where => @query_where + where, :prepared => true)
    pstmt = prepare :delete, sql
    pstmt.send @update_method, *binds
  end
268038
public void DELETE(String partialUrl, Map<String, Object> headers, 
        List<String> queryParams)
    {
        URI uri = buildUri(partialUrl);
        executeDeleteRequest(uri, headers, queryParams);
    }
679784
def delete(path, body = nil, params = {}, headers = {})
      request_headers = request_headers(headers)
      request_options = {
          header: request_headers,
          body: encode_body(body, request_headers['Content-Type']),
          query: params
      }
      response = http_client.delete(request_uri(path), request_options)
      if response.status == 200
        parse_response(response)
      else
        handle_error_response(response)
      end
    end
1026218
def do_delete(endpoint, access_token):
    '''
    '''
    headers = {"Authorization": 'Bearer ' + access_token}
    headers['User-Agent'] = get_user_agent()
    return requests.delete(endpoint, headers=headers)
20773
function onDeleteSuccess(model, params, result) {
  Flux.dispatch(actionTypes.API_DELETE_SUCCESS, {
    model: model,
    params: params,
    result: result,
  })
  return result
}
1157903
def delete(path, options={}, format=format)
      respond request(:delete, path, options, format)
    end
272761
def delete(path, options = {}, headers = {}, raw = false)
      request(:delete, path, options, headers, raw)
    end