category::get_id (public)

 category::get_id name [ locale ]

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

Gets the id of a category given a name.

Parameters:
name (required)
the name of the category to retrieve
locale (optional, defaults to "en_US")
the locale in which the name is supplied
Returns:
the category id or empty string if no category was found
Author:
Lee Denison <lee@xarg.co.uk>

Partial Call Graph (max 5 caller/called nodes):
%3 test_category_get_procs category_get_procs (test categories) category::get_id category::get_id test_category_get_procs->category::get_id db_string db_string (public) category::get_id->db_string

Testcases:
category_get_procs
Source code:
    return [db_string get_category_id {
        select category_id
        from category_translations
        where name = :name
        and locale = :locale
    } -default ""]
XQL Not present:
Generic
PostgreSQL XQL file:
packages/categories/tcl/categories-procs-postgresql.xql

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

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