Decrement the value of the storage.
@param string   $name The name of the item in store.
@param int|null $step The value to decrement, must be an integer.
@author : evalor <master@evalor.cn>
@return bool
498427
public function dec($name, $step = 1)
    {
        return self::$instance->decrBy($this->getCacheKey($name), $step);
    }
277223
public function decrement($key, $step = 1)
    {
        $value = $this->get($key);
        $this->set($key, $value - $step);
    }
476916
public static function incrementingInt(string $name) : Column
    {
        return new Column($name, self::primaryKeyType()->autoIncrement(), true);
    }
503470
protected function rollbackTransaction($name = null)
    {
        $sql = "rollback transaction";
        if ($name !== null) {
            $sql = sprintf("rollback to savepoint %s", $this->escapeIdentifier($name));
        }

        $this->executeAnonymousQuery($sql);

        return $this;
    }
536031
private function pushPipelineStep($name, $stepConfig) {
		$lastStep = $this->Steps()->sort("Order DESC")->first();
		$order = $lastStep ? $lastStep->Order + 1 : 1;
		return $this->generateStep($name, $stepConfig, $order);
	}
834459
public function decrement($key, $step = 1)
    {
        $success = false;
        apcu_dec($this->prefixKey . $key, $step, $success);

        return $success;
    }
635824
public function dec($key, $step = 1) {
        X::logger()->trace("RCache dec '$key' by $step");
        if ($step > 1) {
            return $this->cache->decrBy($key, $step);
        }

        return $this->cache->decr($key);
    }
323439
public function decrement($key, $step)
    {
        $value = $this->getValueByKey($key, false);
        $this->alter($key, $value - $step);
    }
400480
public function setStepStore( $step, array $data )
    {
        $store  = $this->getStore();
        $steps  = $store['steps'];
        $step   = (string) $step;
        $steps[$step]   = $data;
        $store['steps'] = $steps;
        return $this;
    }
792627
private function validateAndNormalizeStep(string $name, $step): array
    {
        static $depth = 0;
        if (!is_array($step)) {
            if (is_string($step) && class_exists($step)) {
                $step = [
                    'class' => $step,
                ];
            } elseif (is_callable($step)) {
                $step = [
                    'callable' => $step,
                ];
            } else {
                $step = [
                    'command' => $step,
                ];
            }
        } else {
            $numMatchedStepTypes = count(array_intersect(['class', 'command', 'callable', 'steps'], array_keys($step)));
            if (0 == $numMatchedStepTypes) {
                if (0 == $depth) {
                    $depth++;
                    // Assume this is an array of commands to be run in parallel
                    $parallelSteps = [];
                    foreach ($step as $parallelName => $parallelStep) {
                        [$parallelName, $parallelStep] = $this->validateAndNormalizeStep(
                            $parallelName,
                            $parallelStep
                        );
                        if (!is_null($parallelName)) {
                            $parallelSteps[$parallelName] = $parallelStep;
                        } else {
                            $parallelSteps[] = $parallelStep;
                        }
                    }
                    $step = [
                        'steps' => $parallelSteps,
                    ];
                    $depth--;
                } else {
                    // Do not allow multiple levels of steps
                    throw new Exception\RuntimeException(
                        'Step "' . $name . '" must include one of the keys "class", "callable", or "command".'
                    );
                }
            } elseif ($numMatchedStepTypes > 1) {
                throw new Exception\RuntimeException(
                    'Step "' . $name
                    . '" may only include one of the keys "class", "callable", "command", or "steps".'
                );
            }
        }

        // @todo Maybe remove this if we move to Yaml config
        if (!empty($step['callable']) && !is_string($step['callable'])) {
            throw new Exception\RuntimeException(
                'Step "' . $name . '" may not be defined as a closure since it cannot be cached. Create a '
                . 'class with a static method instead and define this step as MyClass::myMethod'
            );
        }

        if (!empty($step['class']) && !in_array($this->stepInterface, class_implements($step['class']))) {
            throw new Exception\RuntimeException(
                'Step "' . $name . '" class must implement ' . $this->stepInterface . '.'
            );
        }


        // @todo Should we force a name to be set instead?
        if (empty($name) || is_numeric($name)) {
            // @todo Need unique ID for steps without a name or does null work?
            $name = $step['class'] ?? $step['command'] ?? $step['callable'] ?? null;
        }

        return [$name, $step];
    }
506035
function (name, step) {
            if (this._counters.hasOwnProperty(name)) {
                this._counters[name] += (step || 1);
            } else {
                this._counters[name] = (step || 1);
            }
        }
1163011
function nextStep( $step )
    {
        foreach ( $this->StepTable as $key => $tableStep )
        {
            if ( $step['class'] == $tableStep['class'] )
            {
                return $this->StepTable[++$key];
            }
        }
        $retValue = null;
        return $retValue;
    }
745281
public function decrementByPk($primary_key, $keys, $step = 1)
    {
        if ($this->is_single) {
            return $this->incrementOrDecrementByPk($primary_key, $keys, $step, self::MINUS_NOTIFICATION);
        }
        return false;
    }
1355086
public function inc($name, $step = 1)
    {
        $key = $this->getCacheKey($name);
        if (self::$instance->get($key)) {
            return self::$instance->increment($key, $step);
        }

        return self::$instance->set($key, $step);
    }
743012
protected function delete($step)
    {
        $itemsCollection = $this->matchItems('delete', $step);

        $this->setReferences($itemsCollection, $step);

        $trashService = $this->repository->getTrashService();
        foreach ($itemsCollection as $key => $item) {
            $trashService->deleteTrashItem($item);
        }

        $this->setReferences($itemsCollection, $step);

        return $itemsCollection;
    }
1276197
public function increment($key, $step = 1)
    {
        $this->initializeOnDemand();

        if ($this->cacheMapper->increment($key, $step)) {
            // Synchronize with the current state
            $value = $this->get($key);
            $this->set($key, $value + $step, $this->getKeyTtl($key));

            return true;
        } else {
            return false;
        }
    }
951562
public function decrement(string $key, int $step = 1): int {
		return $this->driver->decrement($key, abs($step));
	}