Add consumer parameter to insert and delete_where

This commit is contained in:
Yuriy Dupyn 2023-10-30 11:18:16 +01:00
parent c333849cc2
commit aa9801fd38
2 changed files with 5 additions and 4 deletions

View file

@ -161,12 +161,12 @@ fn interpret(table_name: TableName, operation: Operation, state: &mut State, con
Insert(table_name, values) => {
let table: &mut Table = todo!();
table.insert(values)
table.insert(values, consumer)
},
Delete(table_name, maybe_condition) => {
let table: &mut Table = todo!();
table.delete_where(maybe_condition)
table.delete_where(maybe_condition, consumer)
},
CreateTable(table_name, table_schema) => {
let table = Table::new(table_name, table_schema);
@ -203,11 +203,11 @@ impl Table {
todo!()
}
fn insert(&mut self, values: InsertionValues) {
fn insert(&mut self, values: InsertionValues, consumer: impl SqlConsumer) {
todo!()
}
fn delete_where(&mut self, maybe_condition: Option<Condition>) {
fn delete_where(&mut self, maybe_condition: Option<Condition>, consumer: impl SqlConsumer) {
todo!()
}
}