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

 xo::db::sql::rel_constraint[i] new [ -dbn dbn ] \
    [ -constraint_id constraint_id ] \
    [ -constraint_type constraint_type ] \
    -constraint_name constraint_name  -rel_segment rel_segment  \
    [ -rel_side rel_side ] -required_rel_segment required_rel_segment  \
    [ -context_id context_id ] [ -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)
-constraint_id
(optional)
-constraint_type
(defaults to "rel_constraint") (optional)
-constraint_name
(required)
-rel_segment
(required)
-rel_side
(defaults to "two") (optional)
-required_rel_segment
(required)
-context_id
(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::rel_constraint proc new xo::db::sql::rel_constraint proc new xo::db::sql::rel_constraint proc new->db_with_handle

Testcases:
No testcase defined.
Source code:
#function_args: {CONSTRAINT_ID null} {CONSTRAINT_TYPE rel_constraint} {CONSTRAINT_NAME {}} {REL_SEGMENT {}} {REL_SIDE two} {REQUIRED_REL_SEGMENT {}} {CONTEXT_ID null} {CREATION_USER null} {CREATION_IP null}
foreach var [list CONSTRAINT_ID CONSTRAINT_TYPE CONSTRAINT_NAME REL_SEGMENT REL_SIDE REQUIRED_REL_SEGMENT CONTEXT_ID 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 rel_constraint__new($_CONSTRAINT_ID$_CONSTRAINT_TYPE$_CONSTRAINT_NAME$_REL_SEGMENT$_REL_SIDE$_REQUIRED_REL_SEGMENT$_CONTEXT_ID$_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: