Removes objects from collection
@param  array $cond Conditions
@param  callable $cb Optional. Callback called when response received
@param  array $params Optional. Params
@callback $cb ( )
@return void
429187
public function remove($cond = [], $cb = null, $params = null)
    {
        $this->pool->remove($this->name, $cond, $cb);
    }
889459
public function beginCondInternal($cond, $pos = 100, array $attr = array())
    {
        $this->capture[] = array($cond, $pos, $attr);
        ob_start();
    }
548198
public function countContentsBySearch($classnames = array(), $cond = array())
    {
        $qb = new ClassContentQueryBuilder($this->_em, $this->_em->getExpressionBuilder()->count('cc'));
        $this->addContentBySearchFilters($qb, $classnames, array(), $cond);
        try {
            $result = $qb->getQuery()->getSingleResult();
        } catch (\Exception $e) {
            return 0;
        }

        return reset($result);
    }
390772
public function updateOne($cond, $data, $cb = null, $params = null)
    {
        $this->pool->updateOne($this->name, $cond, $data, $cb, $params);
    }
699943
public function where($cond, $params, $symbol = 'AND')
    {
        if ($cond instanceof \Closure) {
            $this->where[] = '(';
            $cond();
            $this->where[] = ')';
        }
        $this->where[] = [
            $symbol, $cond, is_array($params) ? $params : [$params]
        ];
        return $this;
    }
1344959
function(cb) {
		var todos = [], prevTodos;
		var model = this;

		open().then(function(db){
			var os = db.transaction(["todos"], "readwrite")
				.objectStore("todos");

			var req = os.openCursor();

			req.onsuccess = function(e){
				var cursor = e.target.result;
				if(cursor){
					todos.push(cursor.value);
					cursor.continue();
				} else {
					prevTodos = todos.slice();
					cb.call(model, todos);
					done();
				}
			};

			function done(){
				(todos || []).forEach(function(todo){
					os.put(todo);
				});
				prevTodos.forEach(function(todo){
					if(todos.indexOf(todo) === -1) {
						os["delete"](todo.text);
					}
				});
			}
		});
	  }
486330
public static function deleteAll($condition, $params = array())
    {
        if (!is_a($condition, '\\mpf\\datasources\\sql\\ModelCondition')) {
            $condition = ModelCondition::getFrom($condition, get_called_class());
        }
        /* @var $condition ModelCondition */
        $condition->setParams($params);
        return static::getDb()->execQuery($condition->forDelete(), $condition->getParams());
    }
433462
function $cond(params) {
    if (
        Array.isArray(params) &&
        params.length === 3 &&
        typeof params[0] === 'boolean'
    ) {
        return params[0] ? params[1] : params[2];
    }
    throw new Error(
        '$cond expects an array of three elements of which the first must be a boolean'
    );
}
433557
public function removeMessage($cb, $uid)
    {
        $this->onResponse->push($cb);
        $this->store([self::FLAG_DELETED], $uid, null, '+', true, self::TAG_DELETEMESSAGE);
    }
263685
public function delete($params, $condition = "id")
	{
		$affected = parent::delete($params, $condition);
		$this->recache();
		return $affected;
	}
129842
function (cb) {
          if (opts.dropCollection) {
            db.listCollections({name: collectionName})
              .toArray(function (err, items) {
                if (err) return cb(err)
                if (items.length) return coll.drop(cb)
                cb()
              })
          } else cb()
        }
115655
public function Delete ($params = FALSE, &$db = FALSE)
	{
		
		// Get database master for write

		if ($db === FALSE)
		{
			$db	=& $this->getDbMaster ();
		}
		
		// Get objects
		
		$objs	= is_array ($params)? self::_getObjects ($params, $db) : [self::_read ($params, $db)];
		
		// Remove each
		
		$db->beginTransaction ();
		
		foreach ($objs as $obj)
		{
			if (!$obj->Remove ())
			{
				$db->rollBack ();
				return FALSE;
			}
		}
		
		$db->commit ();
		return TRUE;
		
	}
1164135
function del(keys, cb){
  if(!keys || keys.length<=0){
    if(cb) return cb(new Error('empty key'));
    else throw new Error('empty key');
  }
  var fns = [];
  for(var j in this._stores){
    var store = this._stores[j];
    fns.push(store.del.bind(store, keys));
  }
  if(cb){
    concurrent(fns, cb);
  }else{
    var fiber = fibext(), rbw = false;
    concurrent(fns, function(){
      fiber.resume.apply(fiber, arguments);
      rbw = true;
    });
    rbw || fiber.wait();
  }
}
580244
function remove(connections, params, cb) {
  var failed = validate(params).has(CONSTANTS.DATA_SOURCE_ID);

  if (failed) {
    return cb(buildErrorResponse({error: new Error("An ID Parameter Is Required To Remove A Data Source"), code: ERROR_CODES.FH_FORMS_INVALID_PARAMETERS}));
  }

  if (!misc.checkId(params[CONSTANTS.DATA_SOURCE_ID])) {
    return cb(buildErrorResponse({error: new Error("Invalid ID Parameter"), code: ERROR_CODES.FH_FORMS_INVALID_PARAMETERS}));
  }
  var DataSource = models.get(connections.mongooseConnection, models.MODELNAMES.DATA_SOURCE);

  async.waterfall([
    function findAssociatedForms(cb) {
      checkFormsUsingDataSource(connections, params, cb);
    },
    function verifyNoFormsAssociated(updatedDataSource, cb) {
      //If there are any forms using this data source, then do not delete it.
      logger.debug("Remove Data Source ", {updatedDataSource: updatedDataSource});

      if (updatedDataSource.forms.length > 0) {
        return cb(buildErrorResponse({
          error: new Error("Forms Are Associated With This Data Source. Please Disassociate Forms From This Data Source Before Deleting."),
          code: ERROR_CODES.FH_FORMS_UNEXPECTED_ERROR
        }));
      }

      return cb(undefined, updatedDataSource);
    },
    function processResponse(updatedDataSource, cb) {
      //Removing The Data Source

      DataSource.remove({_id: updatedDataSource._id}, function(err) {
        if (err) {
          return cb(buildErrorResponse({
            error: err,
            userDetail: "Unexpected Error When Removing A Data Source",
            code: ERROR_CODES.FH_FORMS_UNEXPECTED_ERROR
          }));
        }

        //Data Source Removed Successfully
        return cb(undefined, updatedDataSource);
      });
    },
    function removeAduditLogs(updatedDataSource, cb) {
      DataSource.clearAuditLogs(updatedDataSource._id, cb);
    }
  ], cb);
}
809315
function deleteUserPolicy (params, cb) {
      let promise = null
      if (typeof cb !== 'function') [promise, cb] = asyncify()

      const { userId, organizationId, policyId, instance } = params
      const tasks = [
        (job, next) => {
          Joi.validate({ userId, organizationId, policyId, instance }, validationRules.deleteUserPolicy, (err) => {
            if (err) return next(Boom.badRequest(err))
            next()
          })
        },
        (job, next) => {
          job.id = userId
          job.policyId = policyId
          job.organizationId = organizationId
          job.instance = instance

          next()
        },
        checkUserOrg,
        removeUserPolicy
      ]

      db.withTransaction(tasks, (err, res) => {
        if (err) return cb(err)

        userOps.readUser({ id: userId, organizationId }, cb)
      })

      return promise
    }
508948
public static function closeCon($con_name)
    {
        if (isset(self::$instance[$con_name])) {
            self::instance($con_name)->close();
            unset(self::$instance[$con_name]);
        }
    }
240158
public function del($table, $cond=null)
	{
		return Sql::assistant( $this->ds )->del($table, $cond);
	}