synology_apm_repo.sdk.units.saas.tree_strategy.recursive_group_flat module

RecursiveGroupFlatTree: a recursive folder table whose folders hold flat leaves from another table (M365 Mail).

class synology_apm_repo.sdk.units.saas.tree_strategy.recursive_group_flat.RecursiveGroupFlatTree(provider, *, group_table, group_columns, group_id_column, group_name_column, group_parent_column, group_root_id, leaf_table, leaf_columns, leaf_id_column, leaf_group_column, display_name, order_by, descending=False)

Bases: object

Folders are group_table rows recursing by group_parent_column from group_root_id; a folder’s leaves are the leaf_table rows whose leaf_group_column is its id.

Keys are the path of folder ids (("inbox", "sub")), a leaf adding its own id, so units/resolve.py can descend by prefix. A leaf’s key has no children.

async children_of(key, *, offset=0, limit=None)

One folder’s subfolders, then its leaves. Subfolders are read in full and paginated in Python; leaves are paged in SQL for the rest of the window.