diff --git a/src/abstract_tree/insert.rs b/src/abstract_tree/insert.rs index c274a6b..5218eeb 100644 --- a/src/abstract_tree/insert.rs +++ b/src/abstract_tree/insert.rs @@ -11,7 +11,7 @@ pub struct Insert { impl AbstractTree for Insert { fn from_syntax_node(source: &str, node: Node) -> Result { - let identifier_node = node.child(1).unwrap(); + let identifier_node = node.child(2).unwrap(); let identifier = Identifier::from_syntax_node(source, identifier_node)?; let expression_node = node.child(3).unwrap(); let expression = Expression::from_syntax_node(source, expression_node)?; @@ -29,6 +29,8 @@ impl AbstractTree for Insert { table.reserve(new_rows.len()); + println!("{new_rows:?}"); + for row in new_rows { table.insert(row.into_inner_list()?)?; }