freshnessRuleIdidentifierrequiredWhat identifies the source
Becomes the column freshness_rule_id of freshness_rule.
Written at commons/data/models/operations/mod.ts:166
How old the latest load of a source may be before it is stale: the expectation that source freshness is held to
Model operations. Written in commons/data/models/operations/mod.ts:166. Identified by freshnessRuleId.
freshnessRuleIdidentifierrequiredWhat identifies the source
Becomes the column freshness_rule_id of freshness_rule.
Written at commons/data/models/operations/mod.ts:166
maxAgeHoursintegerrequiredHow many hours old its latest load may be
Becomes the column max_age_hours of freshness_rule.
Written at commons/data/models/operations/mod.ts:166
ownertextrequiredWho is told when it is stale
Becomes the column owner of freshness_rule.
Written at commons/data/models/operations/mod.ts:166
sourcetextrequiredThe source, as a load names it
Becomes the column source of freshness_rule.
Written at commons/data/models/operations/mod.ts:166
Projects to the table freshness_rule with the primary key freshness_rule_id.
| Column | Type | Null | Role | From |
|---|---|---|---|---|
freshness_rule_id | text | false | attribute | freshnessRule.freshnessRuleId |
max_age_hours | integer | false | attribute | freshnessRule.maxAgeHours |
owner | text | false | attribute | freshnessRule.owner |
source | text | false | attribute | freshnessRule.source |
CREATE TABLE IF NOT EXISTS "freshness_rule" (
"freshness_rule_id" VARCHAR NOT NULL PRIMARY KEY,
"source" VARCHAR NOT NULL,
"max_age_hours" INTEGER NOT NULL,
"owner" VARCHAR NOT NULL,
CONSTRAINT "freshness_rule_source_uq" UNIQUE ("source")
);CREATE TABLE IF NOT EXISTS "freshness_rule" (
"freshness_rule_id" TEXT NOT NULL PRIMARY KEY,
"source" TEXT NOT NULL,
"max_age_hours" INTEGER NOT NULL,
"owner" TEXT NOT NULL,
CONSTRAINT "freshness_rule_source_uq" UNIQUE ("source")
);CREATE TABLE IF NOT EXISTS "freshness_rule" (
"freshness_rule_id" TEXT NOT NULL PRIMARY KEY,
"source" TEXT NOT NULL,
"max_age_hours" INTEGER NOT NULL,
"owner" TEXT NOT NULL,
CONSTRAINT "freshness_rule_source_uq" UNIQUE ("source")
);Read and written from TypeScript with the types the model gives: import { freshnessRule } from "@intellectual-frontiers/data/sql/typed/models". Generated in commons/data/sql/typed/models/operations.auto.ts: do not edit.
import { from } from "@intellectual-frontiers/data/sql/typed";
import { freshnessRule } from "@intellectual-frontiers/data/sql/typed/models";
const rows = await from(freshnessRule).select((s) => ({ freshnessRuleId: s.freshnessRule.freshnessRuleId, source: s.freshnessRule.source })).run(runner);