fs::get_folder_package_and_root (public)
fs::get_folder_package_and_root folder_id
Defined in packages/file-storage/tcl/file-storage-procs.tcl
Returns a two-element Tcl list containing the package_id and root_folder_id for the passed-in folder_id.
- Parameters:
- folder_id (required)
- Author:
- Andrew Grumet <aegrumet@alum.mit.edu>
- Created:
- 15 March 2004
- Partial Call Graph (max 5 caller/called nodes):
- Testcases:
- fs_add_file_to_folder
Source code: db_1row select_package_and_root {} return [list $package_id $root_folder_id]Generic XQL file: packages/file-storage/tcl/file-storage-procs.xql
PostgreSQL XQL file: <fullquery name="fs::get_folder_package_and_root.select_package_and_root"> <querytext> With RECURSIVE items AS ( select cr.item_id from cr_items cr where cr.item_id = :folder_id UNION ALL select cr.parent_id from cr_items cr, items where items.item_id = cr.item_id ) select r.package_id, r.folder_id as root_folder_id from items i, fs_root_folders r where r.folder_id = i.item_id </querytext> </fullquery>packages/file-storage/tcl/file-storage-procs-postgresql.xql
Oracle XQL file: <fullquery name="fs::get_folder_package_and_root.select_package_and_root"> <querytext> select r.package_id, r.folder_id as root_folder_id from fs_root_folders r, (select item_id as folder_id from cr_items connect by prior parent_id = item_id start with item_id = :folder_id) t where r.folder_id = t.folder_id </querytext> </fullquery>packages/file-storage/tcl/file-storage-procs-oracle.xql