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.

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: