category::get (public)
category::get -category_id category_id [ -locale locale ]
Defined in packages/categories/tcl/categories-procs.tcl
Get name and description for a category_id in the given or connection's locale. If for the combination of category and locale no entry in category_translations exists, then empty is returned.
- Switches:
- Options:
- -category_id (required)
- -locale (optional)
- -category_id
- category_id of the category to be queried.
- -locale
- locale of the language. [ad_conn locale] used by default.
- Returns:
- list of attribute value pairs containing name and description
- Partial Call Graph (max 5 caller/called nodes):
- Testcases:
- category_crud, category_get_procs
Source code: if {$locale eq ""} { set locale [ad_conn locale] } if {[db_0or1row category_get { select name, description from category_translations where category_id = :category_id and locale = :locale }]} { set result [list name $name description $description] } else { set result "" } return $resultXQL Not present: Generic PostgreSQL XQL file: packages/categories/tcl/categories-procs-postgresql.xql
Oracle XQL file: packages/categories/tcl/categories-procs-oracle.xql