synology_apm_repo.sdk.units.saas.tree_strategy.synthetic_grouped module

SyntheticGroupedTree: Mail/Contact’s shape — a flat list, optionally grouped by one key, one of the two schema shapes every service-level DB in this project expands into (the other being parent-pointer recursion).

class synology_apm_repo.sdk.units.saas.tree_strategy.synthetic_grouped.SyntheticGroupedTree(provider, *, table, columns, id_column, group_column, display_name, root_name, order_by, descending=False, group_display_name=None)

Bases: object

Mail/Contact’s shape: one table, grouped by a value of its own group column; there is no separate group-naming table, so a group’s display name defaults to the group-key value itself unless group_display_name resolves it.

group_column is the real column to filter by (e.g. "parent_folder_id"). GWS passes None because it genuinely has no such column — Gmail has no folder hierarchy at all, only many-to-many labels surfaced as an extra_attrs field rather than a tree grouping, and GWS Contact’s groups are themselves M:N — so every row then falls into one synthetic root_name group instead.

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