10.07.2015 Views

Programming Guide - Actian

Programming Guide - Actian

Programming Guide - Actian

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

TreeNode and Tree ClassesMaintenance MethodsNode Location MethodsTraversal MethodsAddNode MethodUse the following methods to maintain the tree:AddNodeAdds a node to the treeDeleteNodeDeletes a node from the treeUse the following methods to find nodes in a tree:NodeByNameFinds a node with a given name, or TextLabelNodeByKeyFinds a mode with a given key. When you add a node to a tree, you mayspecify a unique key. The NodeByKey method is useful when the nodes ina tree do not have a unique name, and the NodeByName method does notfind a unique node.The following methods let you traverse the entire tree:StartTraverseLets you traverse the entire treeNextNodeReturns the next node after you have started to traverse the treeStopTraverseStops the traverse operationThe AddNode method creates a node and adds it to the tree. It is the basicmethod for building a tree.This method has the following syntax:treenode = tree.AddNode(name = varchar(256),[keylabel = varchar(256),][relative = treenode,][relation = integer]);268 <strong>Programming</strong> <strong>Guide</strong>

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!