ems / beetree
A generic library to work with b-trees
Installs: 3 659
Dependents: 1
Suggesters: 0
Security: 0
Stars: 0
Watchers: 2
Forks: 0
Open Issues: 1
Requires
- php: >=8.2.0
- ems/collection: 0.3.*
- illuminate/database: 11.*
Requires (Dev)
- phpunit/phpunit: 11.1.2
README
A generic library to work with b-trees.
This library offers a few interfaces to work with b-trees.
Until now there are only two implementations of such a b-tree model:
- Eloquent\AdjacencyListModel and
- Eloquent\OrderedAdjacencyListModel
I needed this libs for a few database tasks which did not allow nested set or other implementations. One big disadvantage of nested set and especially ClosureTable are the dependecies of all nodes among themselves.
If you like to copy one part of a tree into another tree of another table this is getting very funny with dependencies of lft, rgt or closuretables. So this library is to have a common interface to access trees and in each case you can deceide to use whatever tree implementation without changing the surrounding logic.
The interfaces have slightly different names of other implementations like etrepat/baum
or franzose/ClosureTable
. This is intended to write the interface implementations into your existing classes.