Add consumer parameter to insert and delete_where
This commit is contained in:
parent
c333849cc2
commit
aa9801fd38
2 changed files with 5 additions and 4 deletions
1
.gitignore
vendored
1
.gitignore
vendored
|
|
@ -1 +1,2 @@
|
||||||
/target
|
/target
|
||||||
|
tmp_repl.txt
|
||||||
|
|
|
||||||
|
|
@ -161,12 +161,12 @@ fn interpret(table_name: TableName, operation: Operation, state: &mut State, con
|
||||||
Insert(table_name, values) => {
|
Insert(table_name, values) => {
|
||||||
let table: &mut Table = todo!();
|
let table: &mut Table = todo!();
|
||||||
|
|
||||||
table.insert(values)
|
table.insert(values, consumer)
|
||||||
},
|
},
|
||||||
Delete(table_name, maybe_condition) => {
|
Delete(table_name, maybe_condition) => {
|
||||||
let table: &mut Table = todo!();
|
let table: &mut Table = todo!();
|
||||||
|
|
||||||
table.delete_where(maybe_condition)
|
table.delete_where(maybe_condition, consumer)
|
||||||
},
|
},
|
||||||
CreateTable(table_name, table_schema) => {
|
CreateTable(table_name, table_schema) => {
|
||||||
let table = Table::new(table_name, table_schema);
|
let table = Table::new(table_name, table_schema);
|
||||||
|
|
@ -203,11 +203,11 @@ impl Table {
|
||||||
todo!()
|
todo!()
|
||||||
}
|
}
|
||||||
|
|
||||||
fn insert(&mut self, values: InsertionValues) {
|
fn insert(&mut self, values: InsertionValues, consumer: impl SqlConsumer) {
|
||||||
todo!()
|
todo!()
|
||||||
}
|
}
|
||||||
|
|
||||||
fn delete_where(&mut self, maybe_condition: Option<Condition>) {
|
fn delete_where(&mut self, maybe_condition: Option<Condition>, consumer: impl SqlConsumer) {
|
||||||
todo!()
|
todo!()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue