@function _delete

set deleted property to true

@param {object} args

@returns {Promise}
482451
function _delete (args) {
    // make sure args is object
    args = requireValidOptionalObject(args)
    // model must allow delete
    if (!defined(this.model.columns.d)) {
        throw this.error('delete not supported')
    }
    // instance must not already be deleted
    if (this.isDeleted) {
        throw this.error('record already deleted')
    }
    // check access to delete unless allow set
    if (!args.allow) {
        // get global access control instance
        var accessControl = ImmutableAccessControl.getGlobal()
        // check access
        var allow = accessControl.allowModel({
            action: 'delete',
            model: this.model.name,
            scope: this.scope,
            session: this.session,
        })
        // throw access denied error if not allowed
        if (!allow) {
            httpError(403, null, accessControl.audit)
        }
    }
    // set d(eleted) flag true
    args.delete = true
    // use update method to empty
    return this.updateMeta(args)
}
825514
function(args) {
      var self = this;
      // var date = new Date();
      this.trigger('loadModelStarted');
      $.when(this.elder('fetch', args)).done(function(ev){
        self.trigger('loadModelCompleted', ev);
        // var dateComplete = new Date()
        // console.log('completed in '+(dateComplete - date));
      }).fail(function(ev) {
        self.trigger('loadModelFailed', ev);
      })
    }
418304
function do_delete(self, ObjType, obj) {
	return nr_fcall("nopg:do_delete", function() {
		if(!(obj && obj.$id)) { throw new TypeError("opts.$id invalid: " + util.inspect(obj) ); }
		var query, params;
		query = "DELETE FROM " + (ObjType.meta.table) + " WHERE id = $1";
		params = [obj.$id];
		return do_query(self, query, params);
	});
}
360683
function clear(callback) {
	        var self = this;

	        var promise = new Promise(function (resolve, reject) {
	            self.ready().then(function () {
	                var dbInfo = self._dbInfo;
	                dbInfo.db.transaction(function (t) {
	                    t.executeSql('DELETE FROM ' + dbInfo.storeName, [], function () {
	                        resolve();
	                    }, function (t, error) {
	                        reject(error);
	                    });
	                });
	            })['catch'](reject);
	        });

	        executeCallback(promise, callback);
	        return promise;
	    }
334977
function(arg, handler) {
		handler = handler ? handler : this.spirit;
		gui.Array.make(arg).forEach(function(type) {
			if (this._removechecks(type, [handler])) {
				if (this._handlers[type]) { // weirdo Gecko condition...
					var index = this._handlers[type].indexOf(type);
					gui.Array.remove(this._handlers[type], index);
					if (this._handlers[type].length === 0) {
						delete this._handlers[type];
					}
				}
			}
		}, this);
		return this.spirit;
	}
1044698
function getStuffAndDeleteSecret(opts, someArgument) {
  // We depend on "stuffs" repository.
  const stuffs = opts.stuffs

  // We may now carry on.
  return stuffs.getStuff(someArgument).then(stuff => {
    // Modify return value. Just to prove this is testable.
    delete stuff.secret
    return stuff
  })
}
125431
function(to_clean) {
    _.map(to_clean, function(value, key, to_clean) {
      if (value === undefined) {
        delete to_clean[key];
      }
    });
    return to_clean;
  }
180505
function lrem(key, count, value, req) {
  var val = this.getKey(key, req);
  if(val === undefined) return 0;
  var deleted = val.lrem(count, value);
  if(val.llen() === 0) {
    this.delKey(key, req);
  }
  return deleted;
}
272083
def delete(self, kwargs):
        
        self._to_delete.append(kwargs)

        if self.should_flush():
            self.flush()
1163087
def delete(*keys, **connection_args):
    '''
    
    '''
    # Get connection args from keywords if set
    conn_args = {}
    for arg in ['host', 'port', 'db', 'password']:
        if arg in connection_args:
            conn_args[arg] = connection_args[arg]

    server = _connect(**conn_args)
    return server.delete(*keys)
956383
public function delete( $args, $assoc_args ) {
		list( $id ) = $args;

		$assoc_args = wp_parse_args( $assoc_args, array(
			'delete_blogs' => false,
		) );

		$network_id = delete_network( $id, $assoc_args['delete_blogs'] );

		if ( is_wp_error( $network_id ) ) {
			WP_CLI::error( $network_id );
		}

		WP_CLI::success( sprintf( 'Deleted network %d.', $id ) );
	}
526699
function cleanup($args)
    {
        $this->_load_drivers();

        if ($this->cache) {
            $this->cache->remove($args['group'], true);
        }

        if ($this->mem_cache) {
            $this->mem_cache->remove($args['group'], true);
        }

        parent::cleanup($args);

        $args['status'] = true;

        return $args;
    }
671320
function del(id, callback) {

    callback = callback || emptyFn

    if (typeof callback !== 'function') {
      throw new TypeError('callback must be a function or empty')
    }

    self.emit('delete', id)
    var query = {}
    query[ options.idProperty ] = id
    deleteMany(query, function() {
      self.emit('afterDelete', '' + id)
      callback(undefined)
    })
  }
837206
def delete(args):
    
    with _catalog(args) as cat:
        n = len(cat)
        cat.delete(args.args[0])
        args.log.info('{0} objects deleted'.format(n - len(cat)))
        return n - len(cat)
1091979
function(obj, key) {
		var value;
		for (var i = 2; i < arguments.length; i++) {
			value = arguments[i];
			if (value !== undefined) {
				obj[key] = value;
				break;
			}
		}

		if (value === undefined) delete obj[key];

		return obj;
	}
261677
def delete(*args)
      arguments(args, required: [:user, :repo, :ref])
      params = arguments.params

      delete_request("/repos/#{arguments.user}/#{arguments.repo}/git/refs/#{arguments.ref}", params)
    end
1067716
def cleanup(args):
    
    with _catalog(args) as cat:
        n, d, r = len(cat), [], []
        for obj in cat:
            if not obj.bitstreams:
                if obj.is_special:
                    print('removing {0} from catalog'.format(obj.id))
                    r.append(obj)
                else:
                    print('deleting {0} from CDSTAR'.format(obj.id))
                    d.append(obj)
        for obj in d:
            cat.delete(obj)
        for obj in r:
            cat.remove(obj)
        args.log.info('{0} objects deleted'.format(n - len(cat)))
        return n - len(cat)