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 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
(defaults to "now()") (optional)
-creation_user
(optional)
-parent_id
(optional)
-context_id
(optional)
-creation_ip
(optional)
-childof
(optional)

Partial Call Graph (max 5 caller/called nodes):
%3 db_with_handle db_with_handle (public) xo::db::sql::download_rep proc new xo::db::sql::download_rep proc new xo::db::sql::download_rep proc new->db_with_handle

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: