From 0e7f0534b7f1a2cc436e91169a50742772369f99 Mon Sep 17 00:00:00 2001 From: matt Date: Mon, 18 Apr 2022 20:17:54 +0000 Subject: [PATCH] Added TestResult.delete --- lib/TestResult.js | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/lib/TestResult.js b/lib/TestResult.js index bada376..a801789 100644 --- a/lib/TestResult.js +++ b/lib/TestResult.js @@ -113,6 +113,17 @@ class TestResult { return 'C'; } + delete() { + const sql = ` + delete from + testResult + where + testResultId = ?; + `; + + this.#conn.runQuery(sql, [ this.id ]); + } + static async create(conn, testId, accountId, studentId, mark) { const sql = ` insert into testResult