xowiki::FormPage instproc update_item_index (public)
<instance of xowiki::FormPage> update_item_index
Defined in /var/www/openacs.org/packages/xowiki/tcl/xowiki-procs.tcl
Tailored version of CrItem.update_item_index to keep insert_xowiki_form_instance_item_index in sync after updates.
- Testcases:
- link_tests
Source code: :instvar name item_id package_id parent_id publish_status page_template instance_attributes assignee state set useHstore [::$package_id get_parameter use_hstore:boolean 0] set updateVars {name = :name, package_id = :package_id, parent_id = :parent_id, publish_status = :publish_status, page_template = :page_template, assignee = :assignee, state = :state} if {$useHstore} { set hkey [::xowiki::hstore::dict_as_hkey [:hstore_attributes]] append updateVars ", hkey = '$hkey'" } set rows [xo::dc dml update_xowiki_form_instance_item_index [subst { update xowiki_form_instance_item_index set $updateVars where item_id = :item_id }]] if {$rows ne "" && $rows < 1} { set insertVars {item_id, name, package_id, parent_id, publish_status, page_template, assignee, state } set insertValues {:item_id, :name, :package_id, :parent_id, :publish_status, :page_template, :assignee, :state } if {$useHstore} { append insertVars {, hkey} append insertValues ", '$hkey'" } ::xo::dc dml insert_xowiki_form_instance_item_index [subst { insert into xowiki_form_instance_item_index ($insertVars) values ($insertValues) }] }XQL Not present: Generic, PostgreSQL, Oracle