xo::db::sql::content_revision proc new (public)
xo::db::sql::content_revision new [ -dbn dbn ] -title title \ [ -description description ] [ -publish_date publish_date ] \ [ -mime_type mime_type ] [ -nls_language nls_language ] \ [ -text text ] -item_id item_id [ -revision_id revision_id ] \ [ -creation_date creation_date ] [ -creation_user creation_user ] \ [ -creation_ip creation_ip ] [ -content_length content_length ] \ [ -package_id package_id ] [ -childof childof ]
Defined in packages/xotcl-core/tcl/05-db-procs.tcl
Automatically generated method
- Switches:
- -dbn
(optional)- -title
(required)- -description
(optional)- -publish_date
(defaults to"now()"
) (optional)- -mime_type
(defaults to"text/plain"
) (optional)- -nls_language
(optional)- -text
(defaults to" "
) (optional)- -item_id
(required)- -revision_id
(optional)- -creation_date
(defaults to"now()"
) (optional)- -creation_user
(optional)- -creation_ip
(optional)- -content_length
(optional)- -package_id
(optional)- -childof
(optional)- Partial Call Graph (max 5 caller/called nodes):
- Testcases:
- No testcase defined.
Source code: #function_args: {TITLE {}} {DESCRIPTION null} {PUBLISH_DATE now()} {MIME_TYPE text/plain} {NLS_LANGUAGE null} {TEXT { }} {ITEM_ID {}} {REVISION_ID null} {CREATION_DATE now()} {CREATION_USER null} {CREATION_IP null} {CONTENT_LENGTH null} {PACKAGE_ID null} foreach var [list TITLE DESCRIPTION PUBLISH_DATE MIME_TYPE NLS_LANGUAGE TEXT ITEM_ID REVISION_ID CREATION_DATE CREATION_USER CREATION_IP CONTENT_LENGTH 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 content_revision__new($_TITLE, $_DESCRIPTION, $_PUBLISH_DATE, $_MIME_TYPE, $_NLS_LANGUAGE, $_TEXT, $_ITEM_ID, $_REVISION_ID, $_CREATION_DATE, $_CREATION_USER, $_CREATION_IP, $_CONTENT_LENGTH, $_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