application_data_link::delete_links (public)

 application_data_link::delete_links -object_id object_id \
    [ -relation_tag relation_tag ]

Defined in packages/acs-tcl/tcl/application-data-link-procs.tcl

Delete application data links for all objects linking to the given object_id. Optionally delete by object_id and relation_tag.

Switches:
-object_id (required)
Object ID that you want application data links removed from.
-relation_tag (optional)
Relationship identifier.

Partial Call Graph (max 5 caller/called nodes):
%3 test_data_links_with_tag data_links_with_tag (test acs-tcl) application_data_link::delete_links application_data_link::delete_links test_data_links_with_tag->application_data_link::delete_links db_dml db_dml (public) application_data_link::delete_links->db_dml db_list db_list (public) application_data_link::delete_links->db_list

Testcases:
data_links_with_tag
Source code:
    set rel_ids [db_list linked_objects {}]

    foreach rel_id $rel_ids {
        db_dml delete_link {}
    }
XQL Not present:
PostgreSQL, Oracle
Generic XQL file:
<fullquery name="application_data_link::delete_links.linked_objects">
    <querytext>
	    select rel_id
	    from acs_data_links
	    where (object_id_one = :object_id
		 or object_id_two = :object_id)
         [application_data_link::relation_tag_where_clause -relation_tag $relation_tag]
    </querytext>
</fullquery>

<fullquery name="application_data_link::delete_links.delete_link">
    <querytext>
	    delete from acs_data_links
	    where rel_id = :rel_id
    </querytext>
</fullquery>
packages/acs-tcl/tcl/application-data-link-procs.xql

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