Implementing insert
This commit is contained in:
parent
75f16a3afe
commit
fa6af4026b
@ -11,7 +11,7 @@ pub struct Insert {
|
|||||||
|
|
||||||
impl AbstractTree for Insert {
|
impl AbstractTree for Insert {
|
||||||
fn from_syntax_node(source: &str, node: Node) -> Result<Self> {
|
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 identifier = Identifier::from_syntax_node(source, identifier_node)?;
|
||||||
let expression_node = node.child(3).unwrap();
|
let expression_node = node.child(3).unwrap();
|
||||||
let expression = Expression::from_syntax_node(source, expression_node)?;
|
let expression = Expression::from_syntax_node(source, expression_node)?;
|
||||||
@ -29,6 +29,8 @@ impl AbstractTree for Insert {
|
|||||||
|
|
||||||
table.reserve(new_rows.len());
|
table.reserve(new_rows.len());
|
||||||
|
|
||||||
|
println!("{new_rows:?}");
|
||||||
|
|
||||||
for row in new_rows {
|
for row in new_rows {
|
||||||
table.insert(row.into_inner_list()?)?;
|
table.insert(row.into_inner_list()?)?;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user