attachments::toggle_approved (public)

 attachments::toggle_approved -object_id object_id -item_id item_id \
    [ -approved_p approved_p ]

Defined in packages/attachments/tcl/attachments-procs.tcl

toggle approved_p for attachment

Switches:
-object_id
(required)
-item_id
(required)
-approved_p
(optional)

Partial Call Graph (max 5 caller/called nodes):
%3 test_attachments_basic_api attachments_basic_api (test attachments) attachments::toggle_approved attachments::toggle_approved test_attachments_basic_api->attachments::toggle_approved db_dml db_dml (public) attachments::toggle_approved->db_dml packages/attachments/www/toggle-approved.tcl packages/attachments/ www/toggle-approved.tcl packages/attachments/www/toggle-approved.tcl->attachments::toggle_approved

Testcases:
attachments_basic_api
Source code:
        db_dml toggle_approved_p {}
XQL Not present:
PostgreSQL, Oracle
Generic XQL file:
<fullquery name="attachments::toggle_approved.toggle_approved_p">
    <querytext>
          update attachments set
             approved_p = coalesce(:approved_p, not approved_p)
            where object_id = :object_id
              and item_id = :item_id
        </querytext>
</fullquery>
packages/attachments/tcl/attachments-procs.xql

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