xo::db::CrItem instproc update_attribute_from_slot

 <instance of xo::db::CrItem[i]> update_attribute_from_slot

Defined in

Partial Call Graph (max 5 caller/called nodes):
%3 test_slot_interactions slot_interactions (test ) xo::db::CrItem instproc update_attribute_from_slot xo::db::CrItem instproc update_attribute_from_slot test_slot_interactions->xo::db::CrItem instproc update_attribute_from_slot test_xowiki xowiki (test ) test_xowiki->xo::db::CrItem instproc update_attribute_from_slot

Testcases:
slot_interactions, xowiki
Source code:
set :[$slot name] $value
if {![info exists revision_id]} {
  set revision_id ${:revision_id}
}
set domain [$slot domain]
#set sql "update [$domain table_name]  #          set [$slot column_name] = '$value'  #  where [$domain id_column] = $revision_id"
#ns_log notice UPDATE-$sql
::xo::dc dml update_attribute_from_slot [subst {
  update [$domain table_name]
  set [$slot column_name] = :value
  where [$domain id_column] = :revision_id
}]
#
# Probably we should call here update_last_modified, but for
# that we would need the modifying_user and the modifying IP
# address.
#
# ::acs::dc call acs_object update_last_modified  #      -object_id $revision_id  #      -modifying_user ${:publish_status}  #      -modifying_ip ...

::xo::dc dml update_attribute_from_slot_last_modified {
  update acs_objects set last_modified = CURRENT_TIMESTAMP
  where object_id = :revision_id
}
XQL Not present:
Generic, PostgreSQL, Oracle
[ hide source ] | [ make this the default ]
Show another procedure: