xo::Context instproc export_vars (public)

 <instance of xo::Context[i]> export_vars [ -all ] [ -level level ]

Defined in packages/xotcl-core/tcl/context-procs.tcl

Export either the declared query variables (default) or all (when explicitly demanded).

Switches:
-all
(optional)
when specified, export all query variables
-level
(defaults to "1") (optional)
target level

Partial Call Graph (max 5 caller/called nodes):
%3 test_link_tests link_tests (test xowiki) xo::Context instproc export_vars xo::Context instproc export_vars test_link_tests->xo::Context instproc export_vars test_package_normalize_path package_normalize_path (test xowiki) test_package_normalize_path->xo::Context instproc export_vars test_path_resolve path_resolve (test xowiki) test_path_resolve->xo::Context instproc export_vars test_slot_interactions slot_interactions (test xowiki) test_slot_interactions->xo::Context instproc export_vars test_xowiki_test_cases xowiki_test_cases (test xowiki) test_xowiki_test_cases->xo::Context instproc export_vars

Testcases:
package_normalize_path, xowiki_test_cases, link_tests, slot_interactions, path_resolve
Source code:

if {$all} {
  foreach p [array names :queryparm] {
    regsub -all : $p _ varName
    uplevel $level [list set $varName [set :queryparm($p)]]
  }
} else {
  #
  # Export only declared parameters (coming from the package
  # initialization or from the includelet definition).
  #
  foreach p [array names :queryparm] {
    if {$p in ${:declared_parameters}} {
      #ns_log notice "=== export <$p>"
      uplevel $level [list set $p [set :queryparm($p)]]
    }
  }
}
#
# Set always variable package_id
#
uplevel $level [list set package_id ${:package_id}]
XQL Not present:
Generic, PostgreSQL, Oracle
[ hide source ] | [ make this the default ]
Show another procedure: