Skip to content
Snippets Groups Projects
Commit 8b7d792c authored by Egor Ivkov's avatar Egor Ivkov
Browse files

feat: add ddl related keys to _pico_property

parent fa51fcb8
No related branches found
No related tags found
1 merge request!509feat: add ddl related keys to _pico_property
Pipeline #17413 passed
......@@ -10,6 +10,7 @@ use crate::replicaset::{Replicaset, ReplicasetId};
use crate::schema::{IndexDef, SpaceDef};
use crate::traft;
use crate::traft::error::Error;
use crate::traft::op::Ddl;
use crate::traft::Migration;
use crate::traft::RaftId;
use crate::traft::Result;
......@@ -514,6 +515,9 @@ pub trait TClusterwideSpaceIndex {
ReplicationFactor = "replication_factor",
VshardBootstrapped = "vshard_bootstrapped",
DesiredSchemaVersion = "desired_schema_version",
PendingSchemaChange = "pending_schema_change",
PendingSchemaVersion = "pending_schema_version",
CurrentSchemaVersion = "current_schema_version",
}
}
......@@ -581,6 +585,24 @@ impl Properties {
.unwrap_or_default();
Ok(res)
}
#[inline]
pub fn pending_schema_change(&self) -> tarantool::Result<Option<Ddl>> {
self.get(PropertyName::PendingSchemaChange)
}
#[inline]
pub fn pending_schema_version(&self) -> tarantool::Result<Option<u64>> {
self.get(PropertyName::PendingSchemaVersion)
}
#[inline]
pub fn current_schema_version(&self) -> tarantool::Result<u64> {
let res = self
.get(PropertyName::CurrentSchemaVersion)?
.unwrap_or_default();
Ok(res)
}
}
////////////////////////////////////////////////////////////////////////////////
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment