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:
objectUnitProviderover one SaaSVersion’s raw object-name-index entries.rootis the version itself;childrenis one leaf per object-name-index entry (or, withobject_db_id— seeparse_object_db_id— one leaf per ObjectDB object) — flat, restorable via aByteRangeViewinto the version’ssaas_obj.- async classmethod create(repo, version, saas_streams, *, object_db_id=None)¶
saas_streamsis borrowed, not owned — the version’ssaas_objis opened via the caller’s sharedSaasStreamCacherather than a privateSaasStreamthis provider would otherwise need to close itself.
- async close()¶
Release the sqlite connection(s) this provider owns — an unclosed
aiosqliteconnection 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’sSaasStreamCache, not owned here, so there’s nothing of its own to release. Tolerates_indexed_db/_manual_dbnever having been assigned (create()failing before either was set), so it’s safe to call fromcreate()’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)¶