xo::db::sql::acs_message proc new_file (public)
xo::db::sql::acs_message new_file [ -dbn dbn ] -message_id message_id \ [ -file_id file_id ] -file_name file_name [ -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 ] [ -storage_type storage_type ] \ [ -package_id package_id ]
Defined in /var/www/openacs.org/packages/xotcl-core/tcl/05-db-procs.tcl
Automatically generated method
- Switches:
- -dbn (optional)
- -message_id (required)
- -file_id (optional)
- -file_name (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"
)- -storage_type (optional, defaults to
"file"
)- -package_id (optional)
- Testcases:
- No testcase defined.
Source code: #function_args: {MESSAGE_ID {}} {FILE_ID null} {FILE_NAME {}} {TITLE null} {DESCRIPTION null} {MIME_TYPE text/plain} {DATA null} {CREATION_DATE sysdate} {CREATION_USER null} {CREATION_IP null} {IS_LIVE t} {STORAGE_TYPE file} {PACKAGE_ID null} foreach var [list MESSAGE_ID FILE_ID FILE_NAME TITLE DESCRIPTION MIME_TYPE DATA CREATION_DATE CREATION_USER CREATION_IP IS_LIVE STORAGE_TYPE PACKAGE_ID] { 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__new_file($_MESSAGE_ID, $_FILE_ID, $_FILE_NAME, $_TITLE, $_DESCRIPTION, $_MIME_TYPE, $_DATA, $_CREATION_DATE, $_CREATION_USER, $_CREATION_IP, $_IS_LIVE, $_STORAGE_TYPE, $_PACKAGE_ID) " 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