IF Commons GitHub

sql/extensions/documentation/settings

Written to: 1 requirement: 1 proved, 0 partly, 0 failing, 0 with no test recorded. 0008-sql-documentation FR-005

The settings of the documentation extensions (commons data 0008-sql-documentation FR-005): a typed value, never a file. The comments are written where the dialect has COMMENT ON; the documentation tables where it has none (the default), everywhere, or nowhere; the governance tables everywhere unless they are off. A setting that is not given is its default.

Source: commons/data/sql/extensions/documentation/settings.ts

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

CommentsSettingtypeno test imports it
type CommentsSetting = "dialect" | "never";

Whether descriptions are written as COMMENT ON where the dialect has it.

defaultSettingsconst
const defaultSettings: DocumentationSettings

The defaults: all three on, the documentation tables where there is no COMMENT ON.

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

DocumentationSettingsinterfaceno test imports it
interface DocumentationSettings

The settings of the three extensions.

MemberTypeWhat it is
commentsCommentsSetting
documentationTablesDocumentationTablesSetting
governanceTablesGovernanceTablesSetting
namesTableNames
DocumentationTablesSettingtypeno test imports it
type DocumentationTablesSetting = "when-no-comment" | "always" | "never";

Where descriptions are also kept in a table.

GovernanceTablesSettingtypeno test imports it
type GovernanceTablesSetting = "on" | "off";

Whether what governance says is kept in tables.

settingsOffunction
function settingsOf(given?: Partial<Omit<DocumentationSettings, "names">> & { readonly names?: Partial<TableNames> | undefined; }): DocumentationSettings

The settings with what is given over the defaults.

ParameterWhat it is
givenwhat a project says; the rest is the default

Returns: the settings

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

TableNamesinterfaceno test imports it
interface TableNames

The names of the tables, as governance writes a name (lower camel case); the case style writes them in the database.

MemberTypeWhat it is
documentationstring
governanceAnnotationstring
governanceTracestring
defaultsconst
const defaults: DocumentationSettings

The defaults: all three on, the documentation tables where there is no COMMENT ON.

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

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