mirror of
				https://github.com/smyalygames/checklist-tester.git
				synced 2025-11-04 04:49:49 +01:00 
			
		
		
		
	feat(connector): create sqldelight table for test result
This commit is contained in:
		
							parent
							
								
									5f456bb898
								
							
						
					
					
						commit
						3a251893cd
					
				@ -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 = ?;
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user