relation_type_is_valid_to_group_p (public)

 relation_type_is_valid_to_group_p [ -group_id group_id ] rel_type

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

Returns 1 if group $group_id allows elements through a relation of type $rel_type, or 0 otherwise. If there are no relational constraints that prevent $group_id from being on side one of a relation of type $rel_type, then 1 is returned.

Switches:
-group_id
(optional)
- if unspecified, then we use [application_group::group_id_from_package_id]
Parameters:
rel_type
Author:
Oumi Mehrotra <oumi@arsdigita.com>
Created:
2000-02-07

Partial Call Graph (max 5 caller/called nodes):
%3 packages/acs-subsite/www/admin/relations/add.tcl packages/acs-subsite/ www/admin/relations/add.tcl relation_type_is_valid_to_group_p relation_type_is_valid_to_group_p packages/acs-subsite/www/admin/relations/add.tcl->relation_type_is_valid_to_group_p 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_type_is_valid_to_group_p application_group::group_id_from_package_id application_group::group_id_from_package_id (public) relation_type_is_valid_to_group_p->application_group::group_id_from_package_id db_string db_string (public) relation_type_is_valid_to_group_p->db_string

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

    return [db_string rel_type_valid_p {}]
Generic XQL file:
<fullquery name="relation_type_is_valid_to_group_p.rel_type_valid_p">
    <querytext>
      
	    select case when exists
	             (select 1 from rc_valid_rel_types r 
                      where r.group_id = :group_id 
                        and r.rel_type = :rel_type)
	           then 1 else 0 end
	      from dual
    
      </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: