xo::db::sql::news proc revision_new (public)
xo::db::sql::news revision_new [ -dbn dbn ] -item_id item_id \ [ -publish_date publish_date ] [ -text text ] -title title \ -description description [ -mime_type mime_type ] \ [ -package_id package_id ] [ -archive_date archive_date ] \ [ -approval_user approval_user ] [ -approval_date approval_date ] \ [ -approval_ip approval_ip ] [ -creation_date creation_date ] \ [ -creation_ip creation_ip ] [ -creation_user creation_user ] \ [ -make_active_revision_p make_active_revision_p ] -lead lead
Defined in /var/www/openacs.org/packages/xotcl-core/tcl/05-db-procs.tcl
Automatically generated method
- Switches:
- -dbn (optional)
- -item_id (required)
- -publish_date (optional)
- -text (optional)
- -title (required)
- -description (required)
- -mime_type (optional, defaults to
"text/plain"
)- -package_id (optional)
- -archive_date (optional)
- -approval_user (optional)
- -approval_date (optional)
- -approval_ip (optional)
- -creation_date (optional, defaults to
"current_timestamp"
)- -creation_ip (optional)
- -creation_user (optional)
- -make_active_revision_p (optional, defaults to
"f"
)- -lead (required)
- Testcases:
- No testcase defined.
Source code: #function_args: {ITEM_ID {}} {PUBLISH_DATE null} {TEXT null} {TITLE {}} {DESCRIPTION {}} {MIME_TYPE text/plain} {PACKAGE_ID null} {ARCHIVE_DATE null} {APPROVAL_USER null} {APPROVAL_DATE null} {APPROVAL_IP null} {CREATION_DATE current_timestamp} {CREATION_IP null} {CREATION_USER null} {MAKE_ACTIVE_REVISION_P f} {LEAD {}} foreach var [list ITEM_ID PUBLISH_DATE TEXT TITLE DESCRIPTION MIME_TYPE PACKAGE_ID ARCHIVE_DATE APPROVAL_USER APPROVAL_DATE APPROVAL_IP CREATION_DATE CREATION_IP CREATION_USER MAKE_ACTIVE_REVISION_P LEAD] { set varname [string tolower $var] if {[info exists $varname]} { set $var [set $varname] set _$var :$var } else { set _$var null } } set sql " select news__revision_new($_ITEM_ID, $_PUBLISH_DATE, $_TEXT, $_TITLE, $_DESCRIPTION, $_MIME_TYPE, $_PACKAGE_ID, $_ARCHIVE_DATE, $_APPROVAL_USER, $_APPROVAL_DATE, $_APPROVAL_IP, $_CREATION_DATE, $_CREATION_IP, $_CREATION_USER, $_MAKE_ACTIVE_REVISION_P, $_LEAD) " 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