mirror of
https://github.com/smyalygames/checklist-tester.git
synced 2026-01-01 17:28:47 +01:00
feat(connector): create sqldelight table for test result
This commit is contained in:
@@ -0,0 +1,20 @@
|
|||||||
|
CREATE TABLE ActionResult (
|
||||||
|
id INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL,
|
||||||
|
testId INTEGER NOT NULL,
|
||||||
|
actionId INTEGER NOT NULL,
|
||||||
|
initState TEXT NOT NULL,
|
||||||
|
endState TEXT,
|
||||||
|
startUTC TEXT NOT NULL,
|
||||||
|
endUTC TEXT,
|
||||||
|
FOREIGN KEY (testId) REFERENCES Test(id),
|
||||||
|
FOREIGN KEY (actionId) REFERENCES Action(id)
|
||||||
|
);
|
||||||
|
|
||||||
|
startResult:
|
||||||
|
INSERT INTO ActionResult(testId, actionId, initState, startUTC)
|
||||||
|
VALUES (?, ?, ?, ?);
|
||||||
|
|
||||||
|
finishResult:
|
||||||
|
UPDATE ActionResult
|
||||||
|
SET endState = ?, endUTC = ?
|
||||||
|
WHERE id = ?;
|
||||||
@@ -0,0 +1,16 @@
|
|||||||
|
CREATE TABLE Test (
|
||||||
|
id INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL,
|
||||||
|
procedureId INTEGER NOT NULL,
|
||||||
|
startUTC TEXT NOT NULL,
|
||||||
|
endUTC TEXT,
|
||||||
|
FOREIGN KEY (procedureId) REFERENCES Procedure(id)
|
||||||
|
);
|
||||||
|
|
||||||
|
startTest:
|
||||||
|
INSERT INTO Test(procedureId, startUTC)
|
||||||
|
VALUES (?, ?);
|
||||||
|
|
||||||
|
endTest:
|
||||||
|
UPDATE Test
|
||||||
|
SET endUTC = ?
|
||||||
|
WHERE id = ?;
|
||||||
Reference in New Issue
Block a user