xo::PackageMgr instproc instances (public)

 <instance of xo::PackageMgr[i]> instances \
    [ -include_unmounted include_unmounted ] [ -closure closure ]

Defined in packages/xotcl-core/tcl/06-package-procs.tcl

Switches:
-include_unmounted
(defaults to "false") (optional)
include unmounted package instances
-closure
(defaults to "false") (optional)
include instances of subclasses of the package
Returns:
list of package_ids of xowiki instances

Partial Call Graph (max 5 caller/called nodes):
%3

Testcases:
No testcase defined.
Source code:
set package_key ${:package_key}
if {$include_unmounted} {
  set result [::xo::dc list get_xowiki_packages {select package_id  from apm_packages where package_key = :package_key}]
} else {
  set result [::xo::dc list get_mounted_packages {select package_id  from apm_packages p, site_nodes s  where package_key = :package_key  and s.object_id = p.package_id}]
}
if {$closure} {
  foreach subclass [:info subclass] {
    foreach id [$subclass instances -include_unmounted $include_unmounted -closure true] {
      lappend result $id
    }
  }
}
return [lsort -integer $result]
XQL Not present:
Generic, PostgreSQL, Oracle
[ hide source ] | [ make this the default ]
Show another procedure: