xo::db::sql::news proc set_approve (public)

 xo::db::sql::news[i] set_approve [ -dbn dbn ] -revision_id revision_id  \
    [ -approve_p approve_p ] [ -publish_date publish_date ] \
    [ -archive_date archive_date ] [ -approval_user approval_user ] \
    [ -approval_date approval_date ] [ -approval_ip approval_ip ] \
    [ -live_revision_p live_revision_p ]

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

Automatically generated method

Switches:
-dbn (optional)
-revision_id (required)
-approve_p (optional, defaults to "t")
-publish_date (optional)
-archive_date (optional)
-approval_user (optional)
-approval_date (optional, defaults to "current_timestamp")
-approval_ip (optional)
-live_revision_p (optional, defaults to "t")

Testcases:
No testcase defined.
Source code:
#function_args: {REVISION_ID {}} {APPROVE_P t} {PUBLISH_DATE null} {ARCHIVE_DATE null} {APPROVAL_USER null} {APPROVAL_DATE current_timestamp} {APPROVAL_IP null} {LIVE_REVISION_P t}
foreach var [list REVISION_ID APPROVE_P PUBLISH_DATE ARCHIVE_DATE APPROVAL_USER APPROVAL_DATE APPROVAL_IP LIVE_REVISION_P]  {
  set varname [string tolower $var]
  if {[info exists $varname]} {
    set $var [set $varname]
    set _$var :$var
  } else {
    set _$var null
  }
}
set sql "
select news__set_approve($_REVISION_ID$_APPROVE_P$_PUBLISH_DATE$_ARCHIVE_DATE$_APPROVAL_USER$_APPROVAL_DATE$_APPROVAL_IP$_LIVE_REVISION_P) 
    "
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: