relation::get_id (public)

 relation::get_id -object_id_one object_id_one \
    -object_id_two object_id_two [ -rel_type rel_type ]

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

Find the rel_id of the relation matching the given object_id_one, object_id_two, and rel_type.

Switches:
-object_id_one (required)
-object_id_two (required)
-rel_type (optional, defaults to "membership_rel")
Returns:
rel_id of the found acs_rel, or the empty string if none existed.

Partial Call Graph (max 5 caller/called nodes):
%3 test_acs_subsite_relation_procs acs_subsite_relation_procs (test acs-subsite) relation::get_id relation::get_id test_acs_subsite_relation_procs->relation::get_id db_string db_string (public) relation::get_id->db_string group::admin_p group::admin_p (public) group::admin_p->relation::get_id packages/acs-subsite/www/group-leave.tcl packages/acs-subsite/ www/group-leave.tcl packages/acs-subsite/www/group-leave.tcl->relation::get_id

Testcases:
acs_subsite_relation_procs
Source code:
    return [db_string select_rel_id {} -default {}]
Generic XQL file:
<fullquery name="relation::get_id.select_rel_id">
    <querytext>

          select rel_id 
          from   acs_rels 
          where  rel_type = :rel_type
          and    object_id_one = :object_id_one
          and    object_id_two = :object_id_two

      </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: