relation::get_object_one (public)

 relation::get_object_one -object_id_two object_id_two \
    [ -rel_type rel_type ] [ -multiple ]

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

Return the object_id of object one if a relation of rel_type exists between the supplied object_id_two and it.

Switches:
-object_id_two (required)
-rel_type (optional, defaults to "membership_rel")
-multiple (optional, boolean)

Partial Call Graph (max 5 caller/called nodes):
%3 test_acs_subsite_relation_procs acs_subsite_relation_procs (test acs-subsite) relation::get_object_one relation::get_object_one test_acs_subsite_relation_procs->relation::get_object_one test_category_tree_procs category_tree_procs (test categories) test_category_tree_procs->relation::get_object_one db_list db_list (public) relation::get_object_one->db_list db_string db_string (public) relation::get_object_one->db_string relation::get_objects relation::get_objects (public) relation::get_objects->relation::get_object_one

Testcases:
acs_subsite_relation_procs, category_tree_procs
Source code:
    if {$multiple_p} {
        return [db_list select_object_one {}]
    } else {
        return [db_string select_object_one {} -default {}]
    }
Generic XQL file:
<fullquery name="relation::get_object_one.select_object_one">
    <querytext>

          select object_id_one 
          from   acs_rels 
          where  rel_type = :rel_type
          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: