feat: SQL 语法支持 BETWEEN AND、DROP TABLE IF EXISTS
This commit is contained in:
@@ -234,6 +234,10 @@ export class QueryExecutor {
|
||||
}
|
||||
|
||||
private async executeDropTable(stmt: DropTableStatement): Promise<void> {
|
||||
if (stmt.ifExists) {
|
||||
const exists = await this.engine.hasTable(stmt.name);
|
||||
if (!exists) return; // IF EXISTS: 表不存在时静默返回
|
||||
}
|
||||
return this.engine.dropTable(stmt.name);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user