IF Commons GitHub

governance/tables

Written to: 1 requirement: 1 proved, 0 partly, 0 failing, 0 with no test recorded. 0002-query-language FR-002

The tables of the language (commons anyfs-query 0002-query-language FR-002): files, content, revisions and places, each with its columns and their types, in order. A table is data; the planner reads which columns a filter touches from here, and the catalog the binder resolves names against is made from it.

Source: commons/anyfs-query/src/governance/tables.ts

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

ColumnTypetypeno test imports it
type ColumnType = "int" | "text" | "bool" | "timestamp";

The types a column has.

TABLE_NAMESconst
const TABLE_NAMES: readonly ["files", "content", "revisions", "places"]

The tables of the language.

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

TableNametypeno test imports it
type TableName = (typeof TABLE_NAMES)[number];

One table of the language.

Columnstypeno test imports it
type Columns = Readonly<Record<string, ColumnType>>;

A table's columns, in order, with their types.

FILE_COLUMNSconstno test imports it
const FILE_COLUMNS: { readonly place: "text"; readonly path: "text"; readonly name: "text"; readonly ext: "text"; readonly size: "int"; readonly media_type: "text"; readonly mtime: "timestamp"; readonly rev: "text"; readonly kind: "text"; readonly depth: "int"; }

The columns of a listing: what a store says of an object without reading it.

CONTENT_ONLY_COLUMNSconstno test imports it
const CONTENT_ONLY_COLUMNS: { readonly text: "text"; readonly is_text: "bool"; readonly redacted: "bool"; }

The columns only a read of an object gives.

TABLE_COLUMNSconst
const TABLE_COLUMNS: Readonly<Record<"content" | "files" | "places" | "revisions", Readonly<Record<string, ColumnType>>>>

The columns of every table.

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

columnNamesconst
const columnNames: (table: "content" | "files" | "places" | "revisions") => readonly string[]

The columns of a table in order.

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

READ_COLUMNSconstno test imports it
const READ_COLUMNS: ReadonlySet<string>

The columns that need a read of the object: a filter on one of them cannot be answered from a listing.

isTableNameconstno test imports it
const isTableName: (text: string) => text is "content" | "files" | "places" | "revisions"

Whether a text is the name of a table.

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