synology_apm_repo.sdk.units.saas.raw_object module

RawObjectProvider: the SaaS fallback UnitProvider, used when a stream’s service-DB can’t be identified.

Every SaaS application-layer provider (mail/drive/contact/ calendar/site) needs its own service-level DB to make sense of a stream’s content; this one needs none — it resolves the exact same object-name index every application-layer provider does (resolve_object_name_index) and shows whatever named objects it lists, raw. dispatch.py falls back here when no application-layer provider recognizes a version’s content (or its sub_type is unknown); the TUI’s diagnostic (d) mode / the CLI’s --verbose can also request it directly via Catalog.provider’s force_raw, even when an application-layer provider did recognize the version. Because it exposes internal index-entry-name/object_id structure directly, it is diagnostic-mode only — the default view of an unrecognized version is a presentation-layer concern handled elsewhere.

class synology_apm_repo.sdk.units.saas.raw_object.RawObjectProvider(repo, version)

Bases: object

UnitProvider over one SaaS Version’s raw object-name-index entries. root is the version itself; children is one leaf per object-name-index entry (or, with object_db_id — see parse_object_db_id — one leaf per ObjectDB object) — flat, restorable via a ByteRangeView into the version’s saas_obj.

async classmethod create(repo, version, saas_streams, *, object_db_id=None)

saas_streams is borrowed, not owned — the version’s saas_obj is opened via the caller’s shared SaasStreamCache rather than a private SaasStream this provider would otherwise need to close itself.

async close()

Release the sqlite connection(s) this provider owns — an unclosed aiosqlite connection owns a non-daemon background thread that keeps the interpreter alive forever, so this matters beyond tidiness. The version’s own stream is borrowed from the caller’s SaasStreamCache, not owned here, so there’s nothing of its own to release. Tolerates _indexed_db/_manual_db never having been assigned (create() failing before either was set), so it’s safe to call from create()’s own failure path.

root()

Pure construction — no I/O, so this stays synchronous (see UnitProvider).

async children(node, offset=0, limit=None)
async unit(node)