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

 xo::db::sql::download_rep[i] new [ -dbn dbn ] \
    -repository_id repository_id  -title title  \
    -description description  [ -help_text help_text ] \
    [ -creation_date creation_date ] [ -creation_user creation_user ] \
    [ -parent_id parent_id ] [ -context_id context_id ] \
    [ -creation_ip creation_ip ] [ -childof childof ]

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

Automatically generated method

Switches:
-dbn (optional)
-repository_id (required)
-title (required)
-description (required)
-help_text (optional)
-creation_date (optional, defaults to "now()")
-creation_user (optional)
-parent_id (optional)
-context_id (optional)
-creation_ip (optional)
-childof (optional)

Testcases:
No testcase defined.
Source code:
#function_args: {REPOSITORY_ID {}} {TITLE {}} {DESCRIPTION {}} {HELP_TEXT null} {CREATION_DATE now()} {CREATION_USER null} {PARENT_ID null} {CONTEXT_ID null} {CREATION_IP null}
foreach var [list REPOSITORY_ID TITLE DESCRIPTION HELP_TEXT CREATION_DATE CREATION_USER PARENT_ID CONTEXT_ID CREATION_IP]  {
  set varname [string tolower $var]
  if {[info exists $varname]} {
    set $var [set $varname]
    set _$var :$var
  } else {
    set _$var null
  }
}
set sql "
select download_rep__new($_REPOSITORY_ID$_TITLE$_DESCRIPTION$_HELP_TEXT$_CREATION_DATE$_CREATION_USER$_PARENT_ID$_CONTEXT_ID$_CREATION_IP) 
    "
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: