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

 xo::db::sql::pa_album[i] new [ -dbn dbn ] -name name  -album_id album_id  \
    [ -parent_id parent_id ] [ -is_live is_live ] \
    [ -creation_user creation_user ] [ -creation_ip creation_ip ] \
    [ -title title ] [ -description description ] [ -story story ] \
    [ -photographer photographer ] [ -revision_id revision_id ] \
    [ -creation_date creation_date ] [ -locale locale ] \
    [ -context_id context_id ] [ -publish_date publish_date ] \
    [ -nls_language nls_language ] [ -childof childof ]

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

Automatically generated method

Switches:
-dbn (optional)
-name (required)
-album_id (required)
-parent_id (optional)
-is_live (optional, defaults to "f")
-creation_user (optional)
-creation_ip (optional)
-title (optional)
-description (optional)
-story (optional, defaults to "null ")
-photographer (optional, defaults to "null ")
-revision_id (optional)
-creation_date (optional, defaults to "now()")
-locale (optional)
-context_id (optional)
-publish_date (optional, defaults to "now()")
-nls_language (optional)
-childof (optional)

Testcases:
No testcase defined.
Source code:
#function_args: {NAME {}} {ALBUM_ID {}} {PARENT_ID null} {IS_LIVE f} {CREATION_USER null} {CREATION_IP null} {TITLE null} {DESCRIPTION null} {STORY {null    }} {PHOTOGRAPHER {null    }} {REVISION_ID null} {CREATION_DATE now()} {LOCALE null} {CONTEXT_ID null} {PUBLISH_DATE now()} {NLS_LANGUAGE null}
foreach var [list NAME ALBUM_ID PARENT_ID IS_LIVE CREATION_USER CREATION_IP TITLE DESCRIPTION STORY PHOTOGRAPHER REVISION_ID CREATION_DATE LOCALE CONTEXT_ID PUBLISH_DATE NLS_LANGUAGE]  {
  set varname [string tolower $var]
  if {[info exists $varname]} {
    set $var [set $varname]
    set _$var :$var
  } else {
    set _$var null
  }
}
set sql "
select pa_album__new($_NAME$_ALBUM_ID$_PARENT_ID$_IS_LIVE$_CREATION_USER$_CREATION_IP$_TITLE$_DESCRIPTION$_STORY$_PHOTOGRAPHER$_REVISION_ID$_CREATION_DATE$_LOCALE$_CONTEXT_ID$_PUBLISH_DATE$_NLS_LANGUAGE) 
    "
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: