diff --git a/minisql/src/interpreter2.rs b/minisql/src/interpreter2.rs index 9426018..ca123ab 100644 --- a/minisql/src/interpreter2.rs +++ b/minisql/src/interpreter2.rs @@ -128,7 +128,6 @@ impl State { } async fn attach_table(&mut self, table: Table) { - // TODO: You need to update the global DB SCHEMA! let new_table_position: TablePosition = self.tables.len(); self.table_name_position_mapping .insert(table.schema().table_name().clone(), new_table_position); diff --git a/minisql/src/type_system.rs b/minisql/src/type_system.rs index 155eb99..ba00632 100644 --- a/minisql/src/type_system.rs +++ b/minisql/src/type_system.rs @@ -2,8 +2,6 @@ use crate::error::TypeConversionError; use proto::message::primitive::pgoid::PgOid; use serde::{Deserialize, Serialize}; use std::cmp::Ordering; -// TODO: Private??? -// use bincode::{Encode, Encoder, EncodeError, Decode, Decoder, DecodeError}; use bincode::{Encode, Decode}; // ==============Types================ @@ -92,7 +90,6 @@ impl PartialOrd for Value { } } -// TODO: Make column know about indexable types impl Ord for Value { fn cmp(&self, other: &Self) -> Ordering { match (self, other) { @@ -120,18 +117,6 @@ impl Ord for Value { } } -// impl Encode for Value { -// fn encode(&self, encoder: &mut E) -> Result<(), EncodeError> { -// todo!() -// } -// } - -// impl Decode for Value { -// fn decode(decoder: &mut D) -> Result { -// todo!() -// } -// } - impl DbType { fn new_n_option(n: usize, inside: DbType) -> DbType { if n == 0 { diff --git a/server/src/main.rs b/server/src/main.rs index c76c371..131caa0 100644 --- a/server/src/main.rs +++ b/server/src/main.rs @@ -85,7 +85,7 @@ async fn handle_stream( let mut wrapped_writer = ServerProtoWrapper::new(writer, config.get_throttle()); let result = match request { Ok(req) => { - handle_connection(&mut reader, &mut wrapped_writer, req, state, token, config).await + handle_connection(&mut reader, &mut wrapped_writer, req, state, token).await } Err(ServerHandshakeError::IsCancelRequest(cancel)) => { handle_cancellation(cancel.pid, cancel.secret, &tokens).await @@ -141,7 +141,6 @@ async fn handle_connection( request: HandshakeRequest, state: SharedDbState, token: ResetCancelToken, - config: Arc, ) -> anyhow::Result<()> where R: FrontendProtoReader + Send, @@ -157,7 +156,7 @@ where break; } FrontendMessage::Query(data) => { - let result = handle_query(writer, &state, data.query.into(), &token, &config).await; + let result = handle_query(writer, &state, data.query.into(), &token).await; match result { Ok(_) => {} Err(e) => writer.write_error_message(&e.to_string()).await?, @@ -176,7 +175,6 @@ async fn handle_query( state: &SharedDbState, query: String, token: &ResetCancelToken, - config: &Arc, ) -> anyhow::Result<()> where W: BackendProtoWriter + ProtoFlush + Send, diff --git a/storage_engine/src/store.rs b/storage_engine/src/store.rs index bb256ff..d90327f 100644 --- a/storage_engine/src/store.rs +++ b/storage_engine/src/store.rs @@ -16,7 +16,6 @@ pub type Result = std::result::Result; pub type Column = u64; pub type FilePosition = u64; -// TODO: Consider adding another type parameter for indexable values #[derive(Debug)] pub struct Store { pub header: StoreHeader,