Join GitHub today
GitHub is home to over 31 million developers working together to host and review code, manage projects, and build software together.Sign up
Delphi implementation of the Celko "nested sets" approach to represent a hierarchy in a relational DB. http://kylecordes.com/2007/nested-sets
Fetching latest commit…
Cannot retrieve the latest commit at this time.
|Type||Name||Latest commit message||Commit time|
|Failed to load latest commit information.|
Kyle's Adjacency -> Nested Sets Translator Copyright 2007 Kyle Cordes This class converts an "Adjacency" hierarchy representation in to a "nested set" representation. Search the web for Joe Celko's nested set articles to learn what that means. This assumes that nodes are identified by ints. You could change it to use strings etc. as needed, of course. To use this class: * create an instance. instances are single-shot, one use. * call "AddNode" 0..N times, once for each node. * call Convert. The processing will occur, and your handler will be called once for each node, with the Left and Right values. Enjoy. I'd love to hear if anyone finds this useful. email@example.com http://kylecordes.com/