Skip to main content

repository

What a domain's repository methods share: the published-partition lookup.

A trial's rows live under the partition its pointer publishes, and each table has its own, so every read pairs the table it wants with the pointer's answer.

Module​

Functions​

published_partitions​

def published_partitions(cache: CacheProtocol, table: str) ‑> dict[str, str]:

Return every project's authoritative partition of table.

Always paired with the table being read: each step writes under its own Merkle hash (bitfount.flows.dag.hashing), so the partition serving the patient_eligibility rollup does not locate scan_eligibility rows.

Arguments

  • cache: The cache backend.
  • table: The cache table about to be read.

Returns A map of project_id → task_hash for that table.

Classes​

RepositoryMixinBase​

class RepositoryMixinBase():

What a domain's repository mixin needs from the class it is mixed into.

Declared as a property rather than an attribute because the concrete repository opens the cache lazily: the mixins call it, and the class that mixes them in is what knows how to get it.