From 8d08c34ddf7b674d17c1bb966a7a4da69daa8254 Mon Sep 17 00:00:00 2001 From: Tobie Morgan Hitchcock Date: Mon, 29 Aug 2022 12:29:10 +0100 Subject: [PATCH] Add support for writeable queries in LET SQL statements --- lib/src/dbs/executor.rs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/lib/src/dbs/executor.rs b/lib/src/dbs/executor.rs index 2ed09397..dbca50ea 100644 --- a/lib/src/dbs/executor.rs +++ b/lib/src/dbs/executor.rs @@ -220,7 +220,10 @@ impl<'a> Executor<'a> { _ => break, } // Cancel transaction - self.cancel(loc).await; + match stm.writeable() { + true => self.commit(loc).await, + false => self.cancel(loc).await, + }; // Return nothing Ok(Value::None) }