From fa6af4026b01d6d97bc7f8282f36adcba41b6221 Mon Sep 17 00:00:00 2001 From: Jeff Date: Sun, 22 Oct 2023 14:10:16 -0400 Subject: [PATCH] Implementing insert --- src/abstract_tree/insert.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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()?)?; }