1
0

Implementing insert

This commit is contained in:
Jeff 2023-10-22 14:10:16 -04:00
parent 75f16a3afe
commit fa6af4026b

View File

@ -11,7 +11,7 @@ pub struct Insert {
impl AbstractTree for Insert {
fn from_syntax_node(source: &str, node: Node) -> Result<Self> {
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()?)?;
}