mirror of
https://github.com/GreptimeTeam/greptimedb.git
synced 2025-12-22 22:20:02 +00:00
chore: create database api change in protobuf (#3682)
This commit is contained in:
2
Cargo.lock
generated
2
Cargo.lock
generated
@@ -3764,7 +3764,7 @@ checksum = "d2fabcfbdc87f4758337ca535fb41a6d701b65693ce38287d856d1674551ec9b"
|
||||
[[package]]
|
||||
name = "greptime-proto"
|
||||
version = "0.1.0"
|
||||
source = "git+https://github.com/GreptimeTeam/greptime-proto.git?rev=c00c73b76ed20a603e4d29fb96cb4e6ef987bba7#c00c73b76ed20a603e4d29fb96cb4e6ef987bba7"
|
||||
source = "git+https://github.com/GreptimeTeam/greptime-proto.git?rev=b97efbf92a0bf9abcfa1d8fe0ffe8741a2e7309e#b97efbf92a0bf9abcfa1d8fe0ffe8741a2e7309e"
|
||||
dependencies = [
|
||||
"prost 0.12.3",
|
||||
"serde",
|
||||
|
||||
@@ -104,7 +104,7 @@ etcd-client = "0.12"
|
||||
fst = "0.4.7"
|
||||
futures = "0.3"
|
||||
futures-util = "0.3"
|
||||
greptime-proto = { git = "https://github.com/GreptimeTeam/greptime-proto.git", rev = "c00c73b76ed20a603e4d29fb96cb4e6ef987bba7" }
|
||||
greptime-proto = { git = "https://github.com/GreptimeTeam/greptime-proto.git", rev = "b97efbf92a0bf9abcfa1d8fe0ffe8741a2e7309e" }
|
||||
humantime = "2.1"
|
||||
humantime-serde = "1.1"
|
||||
itertools = "0.10"
|
||||
|
||||
@@ -635,7 +635,7 @@ impl TryFrom<PbCreateDatabaseTask> for CreateDatabaseTask {
|
||||
fn try_from(pb: PbCreateDatabaseTask) -> Result<Self> {
|
||||
let CreateDatabaseExpr {
|
||||
catalog_name,
|
||||
database_name,
|
||||
schema_name,
|
||||
create_if_not_exists,
|
||||
options,
|
||||
} = pb.create_database.context(error::InvalidProtoMsgSnafu {
|
||||
@@ -644,7 +644,7 @@ impl TryFrom<PbCreateDatabaseTask> for CreateDatabaseTask {
|
||||
|
||||
Ok(CreateDatabaseTask {
|
||||
catalog: catalog_name,
|
||||
schema: database_name,
|
||||
schema: schema_name,
|
||||
create_if_not_exists,
|
||||
options: Some(options),
|
||||
})
|
||||
@@ -665,7 +665,7 @@ impl TryFrom<CreateDatabaseTask> for PbCreateDatabaseTask {
|
||||
Ok(PbCreateDatabaseTask {
|
||||
create_database: Some(CreateDatabaseExpr {
|
||||
catalog_name: catalog,
|
||||
database_name: schema,
|
||||
schema_name: schema,
|
||||
create_if_not_exists,
|
||||
options: options.unwrap_or_default(),
|
||||
}),
|
||||
|
||||
@@ -120,7 +120,7 @@ impl GrpcQueryHandler for Instance {
|
||||
self.statement_executor
|
||||
.create_database(
|
||||
ctx.current_catalog(),
|
||||
&expr.database_name,
|
||||
&expr.schema_name,
|
||||
expr.create_if_not_exists,
|
||||
)
|
||||
.await?
|
||||
|
||||
@@ -74,7 +74,7 @@ mod test {
|
||||
let request = Request::Ddl(DdlRequest {
|
||||
expr: Some(DdlExpr::CreateDatabase(CreateDatabaseExpr {
|
||||
catalog_name: "greptime".to_string(),
|
||||
database_name: "database_created_through_grpc".to_string(),
|
||||
schema_name: "database_created_through_grpc".to_string(),
|
||||
create_if_not_exists: true,
|
||||
options: Default::default(),
|
||||
})),
|
||||
|
||||
Reference in New Issue
Block a user