relation_required_segments_multirow (public)

 relation_required_segments_multirow \
    [ -datasource_name datasource_name ] [ -group_id group_id ] \
    [ -rel_type rel_type ] [ -rel_side rel_side ]

Defined in packages/acs-subsite/tcl/relation-procs.tcl

Sets up a multirow datasource. Also returns a list containing the most essential information.

Switches:
-datasource_name (optional)
-group_id (optional)
-rel_type (optional, defaults to "membership_rel")
-rel_side (optional, defaults to "two")

Partial Call Graph (max 5 caller/called nodes):
%3 packages/acs-subsite/www/admin/parties/new.tcl packages/acs-subsite/ www/admin/parties/new.tcl relation_required_segments_multirow relation_required_segments_multirow packages/acs-subsite/www/admin/parties/new.tcl->relation_required_segments_multirow packages/acs-subsite/www/register/user-join.tcl packages/acs-subsite/ www/register/user-join.tcl packages/acs-subsite/www/register/user-join.tcl->relation_required_segments_multirow ad_urlencode ad_urlencode (public) relation_required_segments_multirow->ad_urlencode application_group::group_id_from_package_id application_group::group_id_from_package_id (public) relation_required_segments_multirow->application_group::group_id_from_package_id db_foreach db_foreach (public) relation_required_segments_multirow->db_foreach template::multirow template::multirow (public) relation_required_segments_multirow->template::multirow

Testcases:
No testcase defined.
Source code:
    if {$group_id eq ""} {
        set group_id [application_group::group_id_from_package_id]
    }

    template::multirow create $datasource_name  segment_id group_id rel_type rel_type_enc  rel_type_pretty_name group_name join_policy


    set group_rel_type_list [list]

    db_foreach select_required_rel_segments {} {
        template::multirow append $datasource_name $segment_id $group_id $rel_type [ad_urlencode $rel_type$rel_type_pretty_name $group_name $join_policy

        lappend group_rel_type_list [list $group_id $rel_type]
    }
    return $group_rel_type_list
Generic XQL file:
<fullquery name="relation_required_segments_multirow.select_required_rel_segments">
    <querytext>

	select distinct s.segment_id, s.group_id, s.rel_type,
	       g.group_name, g.join_policy, t.pretty_name as rel_type_pretty_name,
               coalesce(dl.dependency_level, 0)
	from rc_all_constraints c, 
             (select rel_segment, required_rel_segment
              from rc_segment_required_seg_map
	      where rel_side = 'two'
	      UNION ALL
	      select segment_id, segment_id
	      from rel_segments) map,
             rel_segments s left outer join rc_segment_dependency_levels dl using (segment_id),
	     groups g, acs_object_types t
	where c.group_id = :group_id
	  and c.rel_type = :rel_type
	  and c.required_rel_segment = map.rel_segment
          and map.required_rel_segment = s.segment_id
	  and g.group_id = s.group_id
	  and t.object_type = s.rel_type
        order by coalesce(dl.dependency_level, 0)
    
      </querytext>
</fullquery>
packages/acs-subsite/tcl/relation-procs.xql

PostgreSQL XQL file:
packages/acs-subsite/tcl/relation-procs-postgresql.xql

Oracle XQL file:
packages/acs-subsite/tcl/relation-procs-oracle.xql

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