sql/extensions/target/make
Written to: 2 requirements: 2 proved, 0 partly, 0 failing, 0 with no test recorded. 0025-sql-target FR-004, 0025-sql-target FR-005
Making a database from a build, and keeping the committed file current (commons data 0025-sql-target).
Source: commons/data/sql/extensions/target/make.ts
2 of 3 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 materialize(driver: Driver, build: TargetBuild): Promise<Result<number, { readonly kind: "database"; readonly statement: number; readonly message: string; }>>
Makes a database from a build, in one transaction.
| Parameter | What it is |
|---|
driver | an empty database |
build | the build |
Returns: the number of statements run, or the database's error
Imported by 11 tests of the run (11 passed, 0 failed): the library's results
Stalenesstypeno test imports ittype Staleness = { readonly stale: false } | { readonly stale: true; readonly line: number; readonly committed: string; readonly made: string };
Whether a committed file is what the source makes.
function staleness(committed: string, build: TargetBuild): Staleness
Compares a committed file with what the source makes now.
| Parameter | What it is |
|---|
committed | the text of the committed file |
build | what the source makes now |
Returns: whether it is current, and where it first differs if not
Imported by 4 tests of the run (4 passed, 0 failed): the library's results