xowiki::update_item_index (public)

 xowiki::update_item_index -item_id item_id [ -name name ] \
    [ -package_id package_id ] [ -parent_id parent_id ] \
    [ -publish_status publish_status ] \
    [ -page_template page_template ] [ -assignee assignee ] \
    [ -state state ] [ -hstore_attributes hstore_attributes ]

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

Helper function to update single or multiple fields of the xowiki_form_instance_item_index. Call this function only when updating fields of the xowiki_form_instance_item_index in cases where the standard API based on save and save_use can not be used.

Switches:
-item_id
(required)
-name
(optional)
-package_id
(optional)
-parent_id
(optional)
-publish_status
(optional)
-page_template
(optional)
-assignee
(optional)
-state
(optional)
-hstore_attributes
(optional)

Partial Call Graph (max 5 caller/called nodes):
%3 test_slot_interactions slot_interactions (test xowiki) xowiki::update_item_index xowiki::update_item_index test_slot_interactions->xowiki::update_item_index xowiki::hstore::dict_as_hkey xowiki::hstore::dict_as_hkey (public) xowiki::update_item_index->xowiki::hstore::dict_as_hkey xowiki::FormPage instproc set_live_revision xowiki::FormPage instproc set_live_revision (public) xowiki::FormPage instproc set_live_revision->xowiki::update_item_index xowiki::FormPage instproc update_attribute_from_slot xowiki::FormPage instproc update_attribute_from_slot (public) xowiki::FormPage instproc update_attribute_from_slot->xowiki::update_item_index xowiki::Package instproc reparent xowiki::Package instproc reparent (public) xowiki::Package instproc reparent->xowiki::update_item_index

Testcases:
slot_interactions
Source code:
    set updates {}
    foreach var {
      name package_id parent_id
      publish_status page_template
      assignee state
    } {
      if {[info exists $var]} {
        lappend updates "$var = :$var"
      }
    }
    if {[info exists hstore_attributes]} {
      set hkey [::xowiki::hstore::dict_as_hkey $hstore_attributes]
      lappend updates "hkey = '$hkey'"
    }
    if {[llength $updates] > 0} {
      set setclause [join $updates ,]
      xo::dc dml update_xowiki_form_instance_item_index [subst {
        update xowiki_form_instance_item_index
        set $setclause
        where item_id = :item_id
      }]
    }
XQL Not present:
Generic, PostgreSQL, Oracle
[ hide source ] | [ make this the default ]
Show another procedure: