-
Notifications
You must be signed in to change notification settings - Fork 49
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
98 changed files
with
3,769 additions
and
2,423 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -18,3 +18,4 @@ Cargo.lock | |
/.vscode | ||
/.idea | ||
/.obsidian | ||
.DS_Store |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,7 +2,7 @@ | |
|
||
[package] | ||
name = "kip-sql" | ||
version = "0.0.1-alpha.0" | ||
version = "0.0.1-alpha.3" | ||
edition = "2021" | ||
authors = ["Kould <[email protected]>", "Xwg <[email protected]>"] | ||
description = "build the SQL layer of KipDB database" | ||
|
@@ -37,7 +37,7 @@ ahash = "0.8.3" | |
lazy_static = "1.4.0" | ||
comfy-table = "7.0.1" | ||
bytes = "1.5.0" | ||
kip_db = "0.1.2-alpha.15" | ||
kip_db = "0.1.2-alpha.16" | ||
async-recursion = "1.0.5" | ||
rust_decimal = "1" | ||
csv = "1" | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
nightly-2023-04-07 | ||
nightly-2023-09-29 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,28 +1,21 @@ | ||
use std::sync::Arc; | ||
use sqlparser::ast::ObjectName; | ||
use crate::binder::{Binder, BindError, lower_case_name, split_name}; | ||
use crate::planner::LogicalPlan; | ||
use crate::binder::{lower_case_name, split_name, BindError, Binder}; | ||
use crate::planner::operator::drop_table::DropTableOperator; | ||
use crate::planner::operator::Operator; | ||
use crate::planner::LogicalPlan; | ||
use crate::storage::Storage; | ||
use sqlparser::ast::ObjectName; | ||
use std::sync::Arc; | ||
|
||
impl<S: Storage> Binder<S> { | ||
pub(crate) fn bind_drop_table( | ||
&mut self, | ||
name: &ObjectName | ||
) -> Result<LogicalPlan, BindError> { | ||
pub(crate) fn bind_drop_table(&mut self, name: &ObjectName) -> Result<LogicalPlan, BindError> { | ||
let name = lower_case_name(&name); | ||
let (_, name) = split_name(&name)?; | ||
let table_name = Arc::new(name.to_string()); | ||
|
||
let plan = LogicalPlan { | ||
operator: Operator::DropTable( | ||
DropTableOperator { | ||
table_name | ||
} | ||
), | ||
operator: Operator::DropTable(DropTableOperator { table_name }), | ||
childrens: vec![], | ||
}; | ||
Ok(plan) | ||
} | ||
} | ||
} |
Oops, something went wrong.