IF Commons GitHub

sql/federate/audit

Written to: 1 requirement: 1 proved, 0 partly, 0 failing, 0 with no test recorded. 0059-sql-federate FR-008

Audit of a fan-out (commons data 0059-sql-federate FR-008): optional, and the caller's to place. A fan-out is recorded as a value (who asked what of which targets, and what each answered, without the rows); the caller passes the record to its own sink, or to auditTable, which keeps it in a table of a database the caller gives.

Source: commons/data/sql/federate/audit.ts

2 of 4 exports are imported by a test of the run. A test that imports an export may not call it or check what it returns.

auditOffunction
function auditOf(result: FanOut, by: string): AuditRecord

The record of a fan-out.

ParameterWhat it is
resultthe fan-out
bywho asked

Imported by 7 tests of the run (7 passed, 0 failed): the library's results

auditTablefunction
function auditTable(on: Runner): AuditSink

A sink that keeps records in the table fleet_audit of a database (made if it is not there): one row for each target of each run.

ParameterWhat it is
onthe database and its dialect

Imported by 7 tests of the run (7 passed, 0 failed): the library's results

AuditRecordinterfaceno test imports it
interface AuditRecord

The record of a fan-out: no rows, no values.

MemberTypeWhat it is
runIdstring
atstring
bystringWho asked, as the caller says.
sqlstring
targetsreadonly AuditTarget[]
quorumnumber
quorumMetboolean
AuditTargetinterfaceno test imports it
interface AuditTarget

One line of what a target answered.

MemberTypeWhat it is
targetstring
status"error" | "ok"
rowsnumber
error?string
durationMsnumber

Titles, headings, exports, tables, columns and requirements. Esc closes.