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

 xo::db::sql::acs_message[i] edit_file [ -dbn dbn ] -file_id file_id  \
    [ -title title ] [ -description description ] \
    [ -mime_type mime_type ] [ -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)
-file_id (required)
-title (optional)
-description (optional)
-mime_type (optional, defaults to "text/plain")
-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: {FILE_ID {}} {TITLE null} {DESCRIPTION null} {MIME_TYPE text/plain} {DATA null} {CREATION_DATE sysdate} {CREATION_USER null} {CREATION_IP null} {IS_LIVE t}
foreach var [list FILE_ID TITLE DESCRIPTION MIME_TYPE 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_file($_FILE_ID$_TITLE$_DESCRIPTION$_MIME_TYPE$_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: