acs_sc::msg_type::delete (private)

 acs_sc::msg_type::delete [ -msg_type_id msg_type_id ] [ -name name ]

Defined in packages/acs-service-contract/tcl/msg-type-procs.tcl

Delete a message type. Supply either ID or name.

Switches:
-msg_type_id (optional)
The ID of the msg_type to delete.
-name (optional)
Name of the service contract to delete

Partial Call Graph (max 5 caller/called nodes):
%3 test_acs_sc_impl_new_from_spec acs_sc_impl_new_from_spec (test acs-service-contract) acs_sc::msg_type::delete acs_sc::msg_type::delete test_acs_sc_impl_new_from_spec->acs_sc::msg_type::delete db_1row db_1row (public) acs_sc::msg_type::delete->db_1row db_exec_plsql db_exec_plsql (public) acs_sc::msg_type::delete->db_exec_plsql acs_sc::contract::operation::delete acs_sc::contract::operation::delete (public) acs_sc::contract::operation::delete->acs_sc::msg_type::delete

Testcases:
acs_sc_impl_new_from_spec
Source code:
    if { $msg_type_id eq "" && $name eq "" } {
        error "You must supply either name or msg_type_id"
    }

    # LARS:
    # It seems like delete by ID doesn't work, because our PG bind thing turns all integers into strings
    # by wrapping them in single quotes, causing PG to invoke the function for deleting by name

    if { $name eq "" } {
        # get msg_type name
        db_1row select_name {        
        select msg_type_name as name
        from   acs_sc_msg_types 
        where  msg_type_id = :msg_type_id
    }
    }

    db_exec_plsql delete_by_name {}
Generic XQL file:
<fullquery name="acs_sc::msg_type::delete.select_name">
    <querytext>
        select msg_type_name as name
        from   acs_sc_msg_types 
        where  msg_type_id = :msg_type_id
    </querytext>
</fullquery>
packages/acs-service-contract/tcl/msg-type-procs.xql

PostgreSQL XQL file:
<fullquery name="acs_sc::msg_type::delete.delete_by_name">
    <querytext>
        select acs_sc_msg_type__delete(:name); 	
    </querytext>
</fullquery>
packages/acs-service-contract/tcl/msg-type-procs-postgresql.xql

Oracle XQL file:
<fullquery name="acs_sc::msg_type::delete.delete_by_name">
    <querytext>
        begin
            acs_sc_msg_type.del(
                msg_type_name => :name
            );
        end;
    </querytext>
</fullquery>
packages/acs-service-contract/tcl/msg-type-procs-oracle.xql

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