Expand description
Append-only audit trail for the credit registration ledger.
No retention sweep touches this table, so every Suotar payload must go through
scrub_suotar_body at the
write site — redacting on read would leave the raw values on disk.
Structs§
- Credit
Registration Event - Error
Code Window Counts - One error code’s standing over a window and the window before it.
- NewCredit
Registration Event - NotImproved
Attainment - The attainment the study registry pointed at when it turned a submission down as no improvement.
- Suotar
Item Outcome Totals - How the study registry answered the items it was asked about in a window.
Enums§
- Credit
Registration Event Kind - Suotar
Answer - What Suotar did with one row of a request.
Functions§
- count_
item_ outcomes_ since - Per-item outcomes in
[since, now), counted over events rather than rows: an item that failed really failed, whatever its row has since become. - get_
by_ registration_ id - The per-item timeline, newest first.
- get_
by_ suotar_ api_ call_ id - The per-item timeline entries one study registry call produced, oldest first: what the answer did to each row it covered.
- get_
error_ code_ counts_ for_ window - Error events per code over
[now - 2 * window, now), split atnow - window. - get_
ids_ with_ several_ submitted_ attainments - Registrations whose answers named more than one submitted attainment id, which is the shape a double submission would leave behind.
- get_
not_ improved_ attainment - The registry’s verdict for a row it declined as no improvement.
Nonefor every other row, and for one whose answer named no attainment. - get_
request_ item_ ids_ in_ call - The requestItemId each of
credit_registration_idswent out under amongrequest_item_ids, which are one call’s. A row the call carried but no event recorded is missing from the map. - insert
- Callers that also change
statemust go throughcredit_registrations::transitioninstead, which writes both in one transaction. - insert_
batch - Appends one event per element, in one statement. The column list is
insert’s, so a batch writes the same rows a loop would. - insert_
many - Appends the same event to many rows in one round trip;
insert_batchfor events that differ. - string_
field 🔒