workflow::action::pretty_name_unique_p (public)

 workflow::action::pretty_name_unique_p -workflow_id workflow_id \
    -pretty_name pretty_name [ -parent_action_id parent_action_id ] \
    [ -action_id action_id ]

Defined in packages/workflow/tcl/action-procs.tcl

Check if suggested pretty_name is unique.

Switches:
-workflow_id (required)
-pretty_name (required)
-parent_action_id (optional)
-action_id (optional)
Returns:
1 if unique, 0 if not unique.

Partial Call Graph (max 5 caller/called nodes):
%3 db_string db_string (public) workflow::action::pretty_name_unique_p workflow::action::pretty_name_unique_p workflow::action::pretty_name_unique_p->db_string

Testcases:
No testcase defined.
Source code:
    set exists_p [db_string name_exists {
        select count(*)
        from   workflow_actions
        where  workflow_id = :workflow_id
        and    pretty_name = :pretty_name
        and    (:parent_action_id is null or parent_action_id = :parent_action_id)
        and    (:action_id is null or action_id != :action_id)
    }]
    return [expr {!$exists_p}]
Generic XQL file:
packages/workflow/tcl/action-procs.xql

PostgreSQL XQL file:
packages/workflow/tcl/action-procs-postgresql.xql

Oracle XQL file:
packages/workflow/tcl/action-procs-oracle.xql

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