xo::db::sql::acs_rel_type proc create_role (public)

 xo::db::sql::acs_rel_type[i] create_role [ -dbn dbn ] -role role  \
    [ -pretty_name pretty_name ] [ -pretty_plural pretty_plural ]

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

Automatically generated method

Switches:
-dbn
(optional)
-role
(required)
-pretty_name
(optional)
-pretty_plural
(optional)

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

Testcases:
No testcase defined.
Source code:
#function_args: {ROLE {}} {PRETTY_NAME null} {PRETTY_PLURAL null}
foreach var [list ROLE PRETTY_NAME PRETTY_PLURAL]  {
  set varname [string tolower $var]
  if {[info exists $varname]} {
    set $var [set $varname]
    set _$var :$var
  } else {
    set _$var null
  }
}
set sql "
select acs_rel_type__create_role($_ROLE$_PRETTY_NAME$_PRETTY_PLURAL) 
    "
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: