xowiki::FormPage instproc update_attribute_from_slot (public)

 <instance of xowiki::FormPage[i]> update_attribute_from_slot \
    [ -revision_id revision_id ] slot value

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

Tailored version of update_attribute_from_slot to keep insert_xowiki_form_instance_item_index in sync after single attribute updates.

Switches:
-revision_id
(optional)
Parameters:
slot
value

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

Testcases:
slot_interactions
Source code:
#
# Perform first the regular operations.
#
next
#
# Make sure to update update_item_index when the attribute is
# contained in the xowiki_form_instance_item_index.
#
set colName [$slot column_name]

if {$colName in {
  package_id
  parent_id
  publish_status
  page_template
  assignee
  state
}} {
  ::xowiki::update_item_index -item_id ${:item_id} -$colName $value
} elseif {
          $colName eq "instance_attributes"
          && [::xo::dc has_hstore]
          && [::${:package_id} get_parameter use_hstore:boolean 0]
        } {
  ::xowiki::update_item_index -item_id ${:item_id} -hstore_attributes $value
}
XQL Not present:
Generic, PostgreSQL, Oracle
[ hide source ] | [ make this the default ]
Show another procedure: