From e22b31dc415fe9682edfde32771e7fd73979dbd5 Mon Sep 17 00:00:00 2001 From: Yuriy Dupyn <2153100+omedusyo@users.noreply.github.com> Date: Thu, 1 Feb 2024 13:31:42 +0100 Subject: [PATCH] Locking per table is a concern of a different PR --- minisql/src/internals/table.rs | 3 +-- minisql/src/interpreter.rs | 1 - 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/minisql/src/internals/table.rs b/minisql/src/internals/table.rs index 0f9bb2c..66df647 100644 --- a/minisql/src/internals/table.rs +++ b/minisql/src/internals/table.rs @@ -12,8 +12,7 @@ use crate::type_system::{IndexableValue, Uuid, Value}; #[derive(Debug, Serialize, Deserialize)] pub struct Table { schema: TableSchema, - rows: Rows, // TODO: Consider wrapping this in a lock. Also consider if we need to have the - // same lock for both rows and indexes + rows: Rows, indexes: HashMap, } diff --git a/minisql/src/interpreter.rs b/minisql/src/interpreter.rs index e474673..5955c54 100644 --- a/minisql/src/interpreter.rs +++ b/minisql/src/interpreter.rs @@ -88,7 +88,6 @@ impl State { } pub fn interpret<'a>(&'a mut self, operation: Operation) -> DbResult> { - // TODO: lock stuff use Operation::*; match operation {