site_node::get_ancestors (public)

 site_node::get_ancestors -node_id node_id [ -element element ]

Defined in packages/acs-tcl/tcl/site-nodes-procs.tcl

Switches:
-node_id (required)
-element (optional)
Returns:
the ancestors of this node

Partial Call Graph (max 5 caller/called nodes):
%3 site_node::get site_node::get (public) site_node::get_ancestors site_node::get_ancestors site_node::get_ancestors->site_node::get

Testcases:
No testcase defined.
Source code:
    set result [list]
    set array_result_p [string equal $element ""]

    while {$node_id ne "" } {
        set node [get -node_id $node_id]

        if {$array_result_p} {
            lappend result $node
        } else {
            lappend result [dict get $node $element]
        }

        set node_id [dict get $node parent_id]
    }

    return $result
Generic XQL file:
packages/acs-tcl/tcl/site-nodes-procs.xql

PostgreSQL XQL file:
packages/acs-tcl/tcl/site-nodes-procs-postgresql.xql

Oracle XQL file:
packages/acs-tcl/tcl/site-nodes-procs-oracle.xql

[ hide source ] | [ make this the default ]
Show another procedure: