IF Commons GitHub

sql/cli/doctor

Written to: 7 requirements: 7 proved, 0 partly, 0 failing, 0 with no test recorded. 0046-arcactl FR-003, 0046-arcactl FR-004, 0046-arcactl FR-005, 0046-arcactl FR-006, 0046-arcactl FR-007, 0046-arcactl FR-008 and 1 more

arcactl doctor (commons data 0046-arcactl): a read-only look at a PostgreSQL database against the arca models a configuration names. Each check says pass, warn, fail or that it could not check (a check that lacks a privilege never passes by default), what it found, and what to do. It writes nothing: the only statement that is not a SELECT sets the session's search path.

Source: commons/data/sql/cli/doctor.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.

CheckResultinterfaceno test imports it
interface CheckResult

The result of one check.

MemberTypeWhat it is
idstring
titlestring
statusStatus
detailstring
next?stringWhat to do, where there is something.
checkIdsconst
const checkIds: readonly string[]

The checks, by id.

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

doctorfunction
function doctor(driver: Driver, config: Arca, schema: LogicalSchema, options?: { readonly secrets?: readonly string[] | undefined; readonly only?: readonly string[] | undefined; }): Promise<Report>

Runs the checks.

ParameterWhat it is
driverthe database
configthe configuration, with defaults
schemathe logical schema of the models
optionsthe secrets to keep out of what is said, and the checks to run (all by default)

Returns: the report

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

renderReportfunctionno test imports it
function renderReport(r: Report): string

The report as text.

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