calculationtextrequiredThe calculation it is for
Becomes the column calculation of reference_case.
Written at commons/data/models/proof/mod.ts:93
A case with inputs and the value a calculation must give for them, found by hand or from a source that is trusted, with how close it must be: what a calculation is held to
Model proof. Written in commons/data/models/proof/mod.ts:89. Identified by referenceCaseId.
calculationtextrequiredThe calculation it is for
Becomes the column calculation of reference_case.
Written at commons/data/models/proof/mod.ts:93
descriptiontextrequiredWhat the case shows
Becomes the column description of reference_case.
Written at commons/data/models/proof/mod.ts:94
expectedtextrequiredThe value it must give, as a number
Becomes the column expected of reference_case.
Written at commons/data/models/proof/mod.ts:96
inputstextrequiredThe inputs, as JSON
Becomes the column inputs of reference_case.
Written at commons/data/models/proof/mod.ts:95
referenceCaseIdidentifierrequiredWhat identifies the case
Becomes the column reference_case_id of reference_case.
Written at commons/data/models/proof/mod.ts:92
sourcetextrequiredWhere the value comes from
Becomes the column source of reference_case.
Written at commons/data/models/proof/mod.ts:98
tolerancetextrequiredHow far it may be from the value, as a number: 0 for exact
Becomes the column tolerance of reference_case.
Written at commons/data/models/proof/mod.ts:97
Projects to the table reference_case with the primary key reference_case_id.
| Column | Type | Null | Role | From |
|---|---|---|---|---|
calculation | text | false | attribute | referenceCase.calculation |
description | text | false | attribute | referenceCase.description |
expected | text | false | attribute | referenceCase.expected |
inputs | text | false | attribute | referenceCase.inputs |
reference_case_id | text | false | attribute | referenceCase.referenceCaseId |
source | text | false | attribute | referenceCase.source |
tolerance | text | false | attribute | referenceCase.tolerance |
CREATE TABLE IF NOT EXISTS "reference_case" (
"reference_case_id" VARCHAR NOT NULL PRIMARY KEY,
"calculation" VARCHAR NOT NULL,
"description" VARCHAR NOT NULL,
"inputs" VARCHAR NOT NULL,
"expected" VARCHAR NOT NULL,
"tolerance" VARCHAR NOT NULL,
"source" VARCHAR NOT NULL
);CREATE TABLE IF NOT EXISTS "reference_case" (
"reference_case_id" TEXT NOT NULL PRIMARY KEY,
"calculation" TEXT NOT NULL,
"description" TEXT NOT NULL,
"inputs" TEXT NOT NULL,
"expected" TEXT NOT NULL,
"tolerance" TEXT NOT NULL,
"source" TEXT NOT NULL
);CREATE TABLE IF NOT EXISTS "reference_case" (
"reference_case_id" TEXT NOT NULL PRIMARY KEY,
"calculation" TEXT NOT NULL,
"description" TEXT NOT NULL,
"inputs" TEXT NOT NULL,
"expected" TEXT NOT NULL,
"tolerance" TEXT NOT NULL,
"source" TEXT NOT NULL
);Read and written from TypeScript with the types the model gives: import { referenceCase } from "@intellectual-frontiers/data/sql/typed/models". Generated in commons/data/sql/typed/models/proof.auto.ts: do not edit.
import { from } from "@intellectual-frontiers/data/sql/typed";
import { referenceCase } from "@intellectual-frontiers/data/sql/typed/models";
const rows = await from(referenceCase).select((s) => ({ referenceCaseId: s.referenceCase.referenceCaseId, calculation: s.referenceCase.calculation })).run(runner);