TeraWurflDatabase
[ class tree: TeraWurflDatabase ] [ index: TeraWurflDatabase ] [ all elements ]

Class: TeraWurflMySQLNestedSet

Source Location: /DatabaseConnectors/TeraWurflMySQLNestedSet.php

Class Overview


Takes an existing table with data in ancestor..descendent hierarchial format and ALTERs the table by adding a right and left (`rt` and `lt`) columns. These columns contain the nested set relationships between the nodes. This makes certain lookups (like fallback trees) extremely simple and very fast.


Variables

Methods



Class Details

[line 25]
Takes an existing table with data in ancestor..descendent hierarchial format and ALTERs the table by adding a right and left (`rt` and `lt`) columns. These columns contain the nested set relationships between the nodes. This makes certain lookups (like fallback trees) extremely simple and very fast.

This class is used by Tera-WURFL's MySQL5 Nested Set Database Connector




[ Top ]


Class Variables

$child_query =

[line 40]



Tags:

access:  protected

Type:   mixed


[ Top ]

$column_left =

[line 38]



Tags:

access:  protected

Type:   mixed


[ Top ]

$column_node_id =

[line 36]



Tags:

access:  protected

Type:   mixed


[ Top ]

$column_parent_id =

[line 37]



Tags:

access:  protected

Type:   mixed


[ Top ]

$column_right =

[line 39]



Tags:

access:  protected

Type:   mixed


[ Top ]

$dbcon =

[line 32]



Tags:

access:  protected

Type:   mixed


[ Top ]

$index_table =

[line 35]



Tags:

access:  protected

Type:   mixed


[ Top ]

$left =

[line 33]



Tags:

access:  protected

Type:   mixed


[ Top ]

$max_level =  100

[line 31]

How deeply the recursion can go into the tree



Tags:

access:  protected

Type:   int


[ Top ]

$numQueries =  0

[line 43]



Tags:

access:  public

Type:   mixed


[ Top ]

$source_table =

[line 34]



Tags:

access:  protected

Type:   mixed


[ Top ]

$update_query =

[line 41]



Tags:

access:  protected

Type:   mixed


[ Top ]



Class Methods


constructor __construct [line 45]

TeraWurflMySQLNestedSet __construct( &$dbcon, $source_table, $index_table, $column_node_id, $column_parent_id, [ $column_left = 'lt'], [ $column_right = 'rt'])



Tags:

access:  public


Parameters:

MySQLi   &$dbcon  
   $source_table  
   $index_table  
   $column_node_id  
   $column_parent_id  
   $column_left  
   $column_right  

[ Top ]

method addColumns [line 106]

void addColumns( )



Tags:

access:  public


[ Top ]

method addIndices [line 115]

void addIndices( )



Tags:

access:  public


[ Top ]

method dropColumns [line 98]

void dropColumns( )



Tags:

access:  public


[ Top ]

method generateNestedSet [line 54]

void generateNestedSet( [ $root_node_id = 'generic'])



Tags:

access:  public


Parameters:

   $root_node_id  

[ Top ]

method processChildren [line 123]

void processChildren( $node_id, $level)



Tags:

access:  protected


Parameters:

   $node_id  
   $level  

[ Top ]

method queryGetAncestors [line 73]

void queryGetAncestors( $id, [ $order = "ASC"])



Tags:

access:  public


Parameters:

   $id  
   $order  

[ Top ]


Documentation generated on Sun, 19 Sep 2010 00:16:03 +0000 by phpDocumentor 1.4.3