xo::db::CrClass proc get_name (public)

 xo::db::CrClass[i] get_name -item_id item_id 

Defined in packages/xotcl-core/tcl/cr-procs.tcl

Get the name of a content item either from an already instantiated object or from the database without instantiating it. If item_id is not a valid item_id, we throw an error.

Switches:
-item_id
(required)
Returns:
parent_id

Partial Call Graph (max 5 caller/called nodes):
%3 test_xowiki_test_cases xowiki_test_cases (test xowiki) xo::db::CrClass proc get_name xo::db::CrClass proc get_name test_xowiki_test_cases->xo::db::CrClass proc get_name

Testcases:
xowiki_test_cases
Source code:
# TODO: the following line is deactivated, until we get rid of the "folder object" in xowiki
#if {[nsf::is object ::$item_id]} {return [::$item_id parent_id]}
::xo::dc 1row -prepare integer get_name "select name from cr_items where item_id = :item_id"
return $name
XQL Not present:
Generic, PostgreSQL, Oracle
[ hide source ] | [ make this the default ]
Show another procedure: