Skip to content

Sequence is a very simple database agnostic but database based sequence generator

License

Notifications You must be signed in to change notification settings

digital-competence/DigiComp.Sequence

Repository files navigation

DigiComp.Sequence

Build status

This is a very simple tool, helping in generation of gapless sequences. For this task it relies on key integrity of the database of your choice.

Usage is quite simple also:

    /**
     * @param SequenceGenerator $sequenceGenerator
     */
    public function __construct(SequenceGenerator $sequenceNumberGenerator)
    {
        $this->orderId = $sequenceGenerator->getNextNumberFor($this);
    }

getNextNumberFor allows you to give an object (which will be resolved to its FQCN) or a custom sequence name.

The SequenceCommandController helps you to set the last sequence number, in case of migrations or similar. See ./flow help sequence:setlastnumberfor if interested.

About

Sequence is a very simple database agnostic but database based sequence generator

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors 3

  •  
  •  
  •  

Languages