mirror of
https://github.com/aljazceru/turso.git
synced 2026-02-09 18:24:20 +01:00
Use schema.get_table(...) instead of referencing directly
This commit is contained in:
@@ -489,17 +489,15 @@ pub fn prepare_delete_plan(
|
||||
tbl_name: &QualifiedName,
|
||||
where_clause: Option<Expr>,
|
||||
) -> Result<Plan> {
|
||||
let table_name = tbl_name.name.0.clone();
|
||||
|
||||
let table = if let Some(table) = schema.get_table(&table_name) {
|
||||
table
|
||||
} else {
|
||||
crate::bail_parse_error!("Table {} not found", table_name);
|
||||
// let table_name = tbl_name.name.0.clone();
|
||||
let table = match schema.get_table(tbl_name.name.0.as_str()) {
|
||||
Some(table) => table,
|
||||
None => crate::bail_corrupt_error!("Parse error: no such table: {}", tbl_name),
|
||||
};
|
||||
|
||||
let table_ref = BTreeTableReference {
|
||||
table: table.clone(),
|
||||
table_identifier: table_name.clone(),
|
||||
table_identifier: table.name.clone(),
|
||||
table_index: 0,
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user