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

 xo::db::sql::calendar[i] new [ -dbn dbn ] -calendar_id calendar_id  \
    -calendar_name calendar_name  [ -object_type object_type ] \
    -owner_id owner_id  -private_p private_p  -package_id package_id  \
    -context_id context_id  -creation_date creation_date  \
    -creation_user creation_user  -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)
-calendar_id (required)
-calendar_name (required)
-object_type (optional, defaults to "calendar")
-owner_id (required)
-private_p (required)
-package_id (required)
-context_id (required)
-creation_date (required)
-creation_user (required)
-creation_ip (required)
-childof (optional)

Testcases:
No testcase defined.
Source code:
#function_args: {CALENDAR_ID {}} {CALENDAR_NAME {}} {OBJECT_TYPE calendar} {OWNER_ID {}} {PRIVATE_P {}} {PACKAGE_ID {}} {CONTEXT_ID {}} {CREATION_DATE {}} {CREATION_USER {}} {CREATION_IP {}}
foreach var [list CALENDAR_ID CALENDAR_NAME OBJECT_TYPE OWNER_ID PRIVATE_P PACKAGE_ID CONTEXT_ID CREATION_DATE CREATION_USER 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 calendar__new($_CALENDAR_ID$_CALENDAR_NAME$_OBJECT_TYPE$_OWNER_ID$_PRIVATE_P$_PACKAGE_ID$_CONTEXT_ID$_CREATION_DATE$_CREATION_USER$_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: