category::get_objects (public)

 category::get_objects -category_id category_id \
    [ -object_type object_type ] [ -content_type content_type ] \
    [ -include_children ]

Defined in packages/categories/tcl/categories-procs.tcl

Returns a list of objects which are mapped to this category_id

Switches:
-category_id (required)
CategoryID of the category we want to get the objects for
-object_type (optional)
Limit the search for objects of this object type
-content_type (optional)
Limit the search for objects of this content_type
-include_children (optional, boolean)
Include child categories' objects as well. Not yet implemented
Author:
malte ()
Created:
Wed May 30 06:28:25 CEST 2007

Partial Call Graph (max 5 caller/called nodes):
%3 test_category_object_mapping category_object_mapping (test categories) category::get_objects category::get_objects test_category_object_mapping->category::get_objects db_list db_list (public) category::get_objects->db_list

Testcases:
category_object_mapping
Source code:
    return [db_list get_objects {
        SELECT com.object_id
        FROM category_object_map com
        WHERE com.category_id = :category_id
        and (:object_type is null or
             exists (select 1 from acs_objects
                     where object_id = com.object_id
                       and object_type = :object_type))
        and (:content_type is null or
             exists (select 1 from cr_items
                     where item_id = com.object_id
                       and content_type = :content_type))
    }]
XQL Not present:
Generic
PostgreSQL XQL file:
packages/categories/tcl/categories-procs-postgresql.xql

Oracle XQL file:
packages/categories/tcl/categories-procs-oracle.xql

[ hide source ] | [ make this the default ]
Show another procedure: