rel_types::delete_role (public)

 rel_types::delete_role [ -role role ]

Defined in packages/acs-subsite/tcl/rel-types-procs.tcl

Drop a Relationship Role.

Switches:
-role (optional)
The role to delete.
Returns:
Returns 1 if successful, otherwise 0.
Author:
Nick Carroll <nick.c@rroll.net>
Created:
2005-11-18

Partial Call Graph (max 5 caller/called nodes):
%3 test_acs_subsite_rel_type_roles acs_subsite_rel_type_roles (test acs-subsite) rel_types::delete_role rel_types::delete_role test_acs_subsite_rel_type_roles->rel_types::delete_role db_exec_plsql db_exec_plsql (public) rel_types::delete_role->db_exec_plsql db_transaction db_transaction (public) rel_types::delete_role->db_transaction lang::message::unregister lang::message::unregister (public) rel_types::delete_role->lang::message::unregister

Testcases:
acs_subsite_rel_type_roles
Source code:
        set return_code 1

        db_transaction {
            # Create the message key (refer to rel_types::create_role).
            # Required to unregister translations.
            set message_key "role_${role}"

            # Unegister the language keys
            lang::message::unregister acs-translations $message_key
            lang::message::unregister acs-translations "${message_key}_plural"

            db_exec_plsql drop_role {}
        } on_error {
            set return_code 0
        }
        return $return_code
Generic XQL file:
packages/acs-subsite/tcl/rel-types-procs.xql

PostgreSQL XQL file:
<fullquery name="rel_types::delete_role.drop_role">
    <querytext>
      select acs_rel_type__drop_role(:role)
</querytext>
</fullquery>
packages/acs-subsite/tcl/rel-types-procs-postgresql.xql

Oracle XQL file:
packages/acs-subsite/tcl/rel-types-procs-oracle.xql

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