synology_apm_repo.sdk.units.saas.tree_strategy.named_group_recursive module¶
NamedGroupRecursiveTree: Site’s shape — parent-pointer recursion
(parent_folder_id + a root id) nested within named groups, combining
the two schema shapes every service-level DB in this project expands
into (parent-pointer recursion; a flat list optionally grouped by one
key).
- class synology_apm_repo.sdk.units.saas.tree_strategy.named_group_recursive.NamedGroupRecursiveTree(provider, *, group_table, group_columns, group_id_column, group_name_column, leaf_table, leaf_columns, self_id_of, leaf_group_column, leaf_parent_column, folder, display_name, order_by=(), root_folder_id_of=None, order_by_sql=None)¶
Bases:
objectSite’s shape: like
NamedGroupFlatTree, but the inner table recurses via parent-pointer within each outer group instead of being flat (a document library’s nested folders).self_id_ofsupplies each row’s own id (Site’s ownfile_id-or-item_idrule, not a plain column) — used only to build an outgoing child’s key, never to filter; theWHEREclause always compares against the storedleaf_parent_columnvalue directly.root_folder_id_ofresolves each group’s own top-level anchor. Assuming every group’s top level is the empty string is wrong: a general List’s top level isparent_folder_id = "", but a document library’s top-level items instead share one non-emptylist_version_table.root_folder_idvalue — without this, those top-level rows never match theWHEREclause and the library appears empty. Defaults to the empty string when a caller has no per-group anchor.- async children_of(key, *, offset=0, limit=None)¶
- row_for(key)¶
Nonefor a folder’s own key too, not just a missing one — a folder is never a restorable unit, soassemble()must never see its row even though the cache holds it for traversal.