mirror of
https://github.com/aljazceru/turso.git
synced 2026-01-28 20:34:24 +01:00
translate: updated the command to more closely match SQLite semantics
the command for drop table translation has been updated so that it more closely matches the semantics of SQLite's drop table command. there are a few more things missing like ephemeral tables, destroy etc.
This commit is contained in:
@@ -1101,8 +1101,8 @@ pub fn insn_to_str(
|
||||
0,
|
||||
format!("r[{}]=root iDb={} flags={}", root, db, flags),
|
||||
),
|
||||
Insn::DropBtree { db, root } => (
|
||||
"DropBtree",
|
||||
Insn::DropTable { db, root } => (
|
||||
"DropTable",
|
||||
*db as i32,
|
||||
*root as i32,
|
||||
0,
|
||||
|
||||
@@ -590,8 +590,8 @@ pub enum Insn {
|
||||
flags: usize,
|
||||
},
|
||||
|
||||
// Drop a b-tree
|
||||
DropBtree {
|
||||
// Drop a table
|
||||
DropTable {
|
||||
// The database within which this b-tree needs to be dropped (P1).
|
||||
db: usize,
|
||||
// The root page of this b-tree (P2).
|
||||
|
||||
@@ -2688,7 +2688,7 @@ impl Program {
|
||||
state.registers[*root] = OwnedValue::Integer(root_page as i64);
|
||||
state.pc += 1;
|
||||
}
|
||||
Insn::DropBtree { db, root } => {
|
||||
Insn::DropTable { db, root } => {
|
||||
if *db > 0 {
|
||||
todo!("temp databases not implemented yet");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user