Written to: 1 requirement: 1 proved, 0 partly, 0 failing, 0 with no test recorded. 0055-sql-introspect FR-004
Adopting a database that exists (commons data 0055-sql-introspect): what introspect read, as a logical schema, so that a database nobody modelled can be given typed tables (0053-sql-typed), a dictionary, lifecycle states and checks. The names are the words of the names the database has, the types are the logical types of the engine's (a type of no known family is an error that names it), and the keys, the unique constraints, the foreign keys and the indexes are kept. Nothing is invented: a column's meaning is not in a catalog, so its comment is empty.
Source: commons/data/sql/lifecycle/adopt.ts
1 of 2 exports are imported by a test of the run. A test that imports an export may not call it or check what it returns.
function adopt(observed: Observed, domain: string): Result<LogicalSchema, readonly AdoptError[]>
The logical schema of what a database holds.
| Parameter | What it is |
|---|
observed | what introspect read |
domain | the name of the domain the schema is of |
Returns: the schema, or every column whose type is of no known family
Imported by 4 tests of the run (4 passed, 0 failed): the library's results
AdoptErrorinterfaceno test imports itinterface AdoptError
A column or table that cannot be adopted.
| Member | Type | What it is |
|---|
table | string | |
column? | string | |
why | string | |