baselineHashtextrequiredThe SHA-256 of the rows it gave
Becomes the column baseline_hash of workload_statement.
Written at commons/data/models/operations/mod.ts:148
A read-only statement of a workload with the number of rows and the hash of the rows it gave when it was recorded, to be replayed and compared
Model operations. Written in commons/data/models/operations/mod.ts:148. Identified by workloadStatementId.
baselineHashtextrequiredThe SHA-256 of the rows it gave
Becomes the column baseline_hash of workload_statement.
Written at commons/data/models/operations/mod.ts:148
baselineRowsintegerrequiredHow many rows it gave
Becomes the column baseline_rows of workload_statement.
Written at commons/data/models/operations/mod.ts:148
statementtextrequiredThe statement, a single select
Becomes the column statement of workload_statement.
Written at commons/data/models/operations/mod.ts:148
workloadStatementIdidentifierrequiredWhat identifies the statement
Becomes the column workload_statement_id of workload_statement.
Written at commons/data/models/operations/mod.ts:148
workloadoneThe workload it belongs to To workload. Written at commons/data/models/operations/mod.ts:148
Projects to the table workload_statement with the primary key workload_statement_id.
| Column | Type | Null | Role | From |
|---|---|---|---|---|
baseline_hash | text | false | attribute | workloadStatement.baselineHash |
baseline_rows | integer | false | attribute | workloadStatement.baselineRows |
statement | text | false | attribute | workloadStatement.statement |
workload_id | text | false | reference | workloadStatement.workload |
workload_statement_id | text | false | attribute | workloadStatement.workloadStatementId |
CREATE TABLE IF NOT EXISTS "workload_statement" (
"workload_statement_id" VARCHAR NOT NULL PRIMARY KEY,
"statement" VARCHAR NOT NULL,
"baseline_rows" INTEGER NOT NULL,
"baseline_hash" VARCHAR NOT NULL,
"workload_id" VARCHAR NOT NULL,
CONSTRAINT "workload_statement_workload_id_fk" FOREIGN KEY ("workload_id") REFERENCES "workload" ("workload_id")
);CREATE TABLE IF NOT EXISTS "workload_statement" (
"workload_statement_id" TEXT NOT NULL PRIMARY KEY,
"statement" TEXT NOT NULL,
"baseline_rows" INTEGER NOT NULL,
"baseline_hash" TEXT NOT NULL,
"workload_id" TEXT NOT NULL,
CONSTRAINT "workload_statement_workload_id_fk" FOREIGN KEY ("workload_id") REFERENCES "workload" ("workload_id")
);CREATE TABLE IF NOT EXISTS "workload_statement" (
"workload_statement_id" TEXT NOT NULL PRIMARY KEY,
"statement" TEXT NOT NULL,
"baseline_rows" INTEGER NOT NULL,
"baseline_hash" TEXT NOT NULL,
"workload_id" TEXT NOT NULL,
CONSTRAINT "workload_statement_workload_id_fk" FOREIGN KEY ("workload_id") REFERENCES "workload" ("workload_id")
);Read and written from TypeScript with the types the model gives: import { workloadStatement } 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 { workloadStatement } from "@intellectual-frontiers/data/sql/typed/models";
const rows = await from(workloadStatement).select((s) => ({ workloadStatementId: s.workloadStatement.workloadStatementId, statement: s.workloadStatement.statement })).run(runner);