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

 xo::db::sql::site_node[i] new [ -dbn dbn ] [ -node_id node_id ] \
    [ -parent_id parent_id ] -name name  [ -object_id object_id ] \
    -directory_p directory_p  [ -pattern_p pattern_p ] \
    [ -creation_user creation_user ] [ -creation_ip creation_ip ] \
    [ -childof childof ]

Defined in packages/xotcl-core/tcl/05-db-procs.tcl

Automatically generated method

Switches:
-dbn
(optional)
-node_id
(optional)
-parent_id
(optional)
-name
(required)
-object_id
(optional)
-directory_p
(required)
-pattern_p
(defaults to "f") (optional)
-creation_user
(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::site_node proc new xo::db::sql::site_node proc new xo::db::sql::site_node proc new->db_with_handle

Testcases:
No testcase defined.
Source code:
#function_args: {NODE_ID null} {PARENT_ID null} {NAME {}} {OBJECT_ID null} {DIRECTORY_P {}} {PATTERN_P f} {CREATION_USER null} {CREATION_IP null}
foreach var [list NODE_ID PARENT_ID NAME OBJECT_ID DIRECTORY_P PATTERN_P 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 site_node__new($_NODE_ID$_PARENT_ID$_NAME$_OBJECT_ID$_DIRECTORY_P$_PATTERN_P$_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: