package_recreate_hierarchy (public)
package_recreate_hierarchy object_type
Defined in packages/acs-subsite/tcl/package-procs.tcl
Recreates all the packages for the hierarchy starting with the specified object type down to a leaf. Resets the package_object_view cache. Note: Only updates packages for dynamic objects (those with dynamic_p set to t)
- Parameters:
- object_type (required)
- The object type for which to recreate packages, including all children types.
- Author:
- Michael Bryzek <mbryzek@arsdigita.com>
- Created:
- 12/28/2000
- Partial Call Graph (max 5 caller/called nodes):
- Testcases:
- No testcase defined.
Source code: set object_type_list [db_list select_object_types {}] # Something changed... flush the data dictionary cache for the # type hierarchy starting with this object's type. Note that we # flush the cache in advance to reuse it when generating future packages # for object_types in the same level of the hierarchy. Note also that # maintaining this cache only gives us a few hits in the cache in # the degenerate case (one subtype), but the query we're caching # is dreadfully slow because of data dictionary tables. So # ensuring we only run the query once significantly improves # performance. -mbryzek foreach object_type $object_type_list { if { [util_memoize_cached_p [list package_table_columns_for_type $object_type]] } { util_memoize_flush [list package_table_columns_for_type $object_type] } } foreach type $object_type_list { package_create $type }Generic XQL file: packages/acs-subsite/tcl/package-procs.xql
PostgreSQL XQL file: <fullquery name="package_recreate_hierarchy.select_object_types"> <querytext> select t2.object_type from acs_object_types t1, acs_object_types t2 where t2.dynamic_p = 't' and t2.tree_sortkey between t1.tree_sortkey and tree_right(t1.tree_sortkey) and t1.object_type = :object_type </querytext> </fullquery>packages/acs-subsite/tcl/package-procs-postgresql.xql
Oracle XQL file: <fullquery name="package_recreate_hierarchy.select_object_types"> <querytext> select t.object_type from acs_object_types t where t.dynamic_p = 't' start with t.object_type = :object_type connect by prior t.object_type = t.supertype </querytext> </fullquery>packages/acs-subsite/tcl/package-procs-oracle.xql