xo::db::sql::sec_session_property proc upsert (public)

 xo::db::sql::sec_session_property[i] upsert [ -dbn dbn ] \
    -session_id session_id  -module module  -name name  -value value  \
    -secure_p secure_p  -last_hit last_hit 

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

Automatically generated method

Switches:
-dbn
(optional)
-session_id
(required)
-module
(required)
-name
(required)
-value
(required)
-secure_p
(required)
-last_hit
(required)

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

Testcases:
No testcase defined.
Source code:
#function_args: {SESSION_ID {}} {MODULE {}} {NAME {}} {VALUE {}} {SECURE_P {}} {LAST_HIT {}}
foreach var [list SESSION_ID MODULE NAME VALUE SECURE_P LAST_HIT]  {
  set varname [string tolower $var]
  if {[info exists $varname]} {
    set $var [set $varname]
    set _$var :$var
  } else {
    set _$var null
  }
}
set sql "
select sec_session_property__upsert($_SESSION_ID$_MODULE$_NAME$_VALUE$_SECURE_P$_LAST_HIT) 
    "
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: