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

 xo::db::sql::news[i] new [ -dbn dbn ] [ -item_id item_id ] \
    [ -locale locale ] [ -publish_date publish_date ] [ -text text ] \
    [ -nls_language nls_language ] [ -title title ] \
    [ -mime_type mime_type ] [ -package_id package_id ] \
    [ -archive_date archive_date ] [ -approval_user approval_user ] \
    [ -approval_date approval_date ] [ -approval_ip approval_ip ] \
    [ -relation_tag relation_tag ] [ -creation_ip creation_ip ] \
    [ -creation_user creation_user ] [ -is_live_p is_live_p ] \
    -lead lead  [ -childof childof ]

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

Automatically generated method

Switches:
-dbn (optional)
-item_id (optional)
-locale (optional)
-publish_date (optional)
-text (optional)
-nls_language (optional)
-title (optional)
-mime_type (optional, defaults to "text/plain")
-package_id (optional)
-archive_date (optional)
-approval_user (optional)
-approval_date (optional)
-approval_ip (optional)
-relation_tag (optional)
-creation_ip (optional)
-creation_user (optional)
-is_live_p (optional, defaults to "f")
-lead (required)
-childof (optional)

Testcases:
No testcase defined.
Source code:
#function_args: {ITEM_ID null} {LOCALE null} {PUBLISH_DATE null} {TEXT null} {NLS_LANGUAGE null} {TITLE null} {MIME_TYPE text/plain} {PACKAGE_ID null} {ARCHIVE_DATE null} {APPROVAL_USER null} {APPROVAL_DATE null} {APPROVAL_IP null} {RELATION_TAG null} {CREATION_IP null} {CREATION_USER null} {IS_LIVE_P f} {LEAD {}}
foreach var [list ITEM_ID LOCALE PUBLISH_DATE TEXT NLS_LANGUAGE TITLE MIME_TYPE PACKAGE_ID ARCHIVE_DATE APPROVAL_USER APPROVAL_DATE APPROVAL_IP RELATION_TAG CREATION_IP CREATION_USER IS_LIVE_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__new($_ITEM_ID$_LOCALE$_PUBLISH_DATE$_TEXT$_NLS_LANGUAGE$_TITLE$_MIME_TYPE$_PACKAGE_ID$_ARCHIVE_DATE$_APPROVAL_USER$_APPROVAL_DATE$_APPROVAL_IP$_RELATION_TAG$_CREATION_IP$_CREATION_USER$_IS_LIVE_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
[ hide source ] | [ make this the default ]
Show another procedure: