Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Introduce pre-ordering to hieratical dataobjects
PHP
branch: master

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
code
README
_config.php

README

The idea of this module is to introduce additional ordering fields to speed up hierarchical data retrieval.

See
http://iamcam.wordpress.com/2006/03/24/storing-hierarchical-data-in-a-database-part-2a-modified-preorder-tree-traversal
http://articles.sitepoint.com/article/hierarchical-data-database

TODO:
 * Adding nodes: add 2 to each LHS and RHS where LHS or RHS is greater than the RHS where you are adding the node.
 * Re-Ordering nodes: add X to LHS and RHS for all greater nodes, where X is the total number of nodes being shifted (+2?). Might need to run a 'cleanup' also that removes gaps?
 
 * Live vs Stage + roll back etc? not sure what to do here.
 
 * Handle the query cases where a node should not be visible, and the children should not be visible.
		-This could be done by running a second query that excludes the range of values between the parent's LHS and RHS. Or perhaps by a sub-query.
Something went wrong with that request. Please try again.