xo::db::sql::acs_message proc edit (public)

 xo::db::sql::acs_message[i] edit [ -dbn dbn ] -message_id message_id  \
    [ -title title ] [ -description description ] \
    [ -mime_type mime_type ] [ -text text ] [ -data data ] \
    [ -creation_date creation_date ] [ -creation_user creation_user ] \
    [ -creation_ip creation_ip ] [ -is_live is_live ]

Defined in /var/www/openacs.org/packages/xotcl-core/tcl/05-db-procs.tcl

Automatically generated method

Switches:
-dbn (optional)
-message_id (required)
-title (optional)
-description (optional)
-mime_type (optional, defaults to "text/plain")
-text (optional)
-data (optional)
-creation_date (optional, defaults to "sysdate")
-creation_user (optional)
-creation_ip (optional)
-is_live (optional, defaults to "t")

Testcases:
No testcase defined.
Source code:
#function_args: {MESSAGE_ID {}} {TITLE null} {DESCRIPTION null} {MIME_TYPE text/plain} {TEXT null} {DATA null} {CREATION_DATE sysdate} {CREATION_USER null} {CREATION_IP null} {IS_LIVE t}
foreach var [list MESSAGE_ID TITLE DESCRIPTION MIME_TYPE TEXT DATA CREATION_DATE CREATION_USER CREATION_IP IS_LIVE]  {
  set varname [string tolower $var]
  if {[info exists $varname]} {
    set $var [set $varname]
    set _$var :$var
  } else {
    set _$var null
  }
}
set sql "
select acs_message__edit($_MESSAGE_ID$_TITLE$_DESCRIPTION$_MIME_TYPE$_TEXT$_DATA$_CREATION_DATE$_CREATION_USER$_CREATION_IP$_IS_LIVE) 
    "
db_with_handle -dbn $dbn db {
  #ns_log notice "--sql=$sql"
  return [ ns_set value [ns_pg_bind 0or1row $db $sql] 0 ]
}
XQL Not present:
Generic, PostgreSQL, Oracle
[ hide source ] | [ make this the default ]
Show another procedure: