column reindexation implemented and others
This commit is contained in:
2
client
2
client
Submodule client updated: a46ff11093...70241e22c4
Submodule client-gui2 updated: fbb1931580...6af9d5a127
@@ -66,6 +66,10 @@ service TableDefinition {
|
||||
// presentation metadata and may be changed after rows have been stored.
|
||||
rpc SetRowDisplayColumns(SetRowDisplayColumnsRequest) returns (SetRowDisplayColumnsResponse);
|
||||
|
||||
// Replaces the user-managed indexes of an existing dynamic table. Physical
|
||||
// indexes are created or dropped even when rows have already been stored.
|
||||
rpc SetTableIndexes(SetTableIndexesRequest) returns (SetTableIndexesResponse);
|
||||
|
||||
// Replaces the optional user-visible aliases for a fixed-option column.
|
||||
// Stored values remain stable machine values and scripts never depend on labels.
|
||||
rpc SetColumnOptionAliases(SetColumnOptionAliasesRequest) returns (SetColumnOptionAliasesResponse);
|
||||
@@ -529,6 +533,9 @@ message TableDetail {
|
||||
// soft-deleted row. Populated tables are append-only: PutTableDefinition is
|
||||
// no longer available, while AddTableColumns remains available.
|
||||
bool has_data = 12;
|
||||
|
||||
// User-managed single-column indexes. Backend-managed indexes are omitted.
|
||||
repeated string indexes = 13;
|
||||
}
|
||||
|
||||
// Server-owned behavior for one logical column returned in table details.
|
||||
@@ -608,6 +615,23 @@ message SetRowDisplayColumnsResponse {
|
||||
int64 row_version = 3;
|
||||
}
|
||||
|
||||
// Atomically replaces the table's user-managed single-column indexes. Indexes
|
||||
// owned by the backend, including link and navigation indexes, are unchanged.
|
||||
message SetTableIndexesRequest {
|
||||
string profile_name = 1;
|
||||
string table_name = 2;
|
||||
repeated string indexes = 3;
|
||||
// Row version returned by GetProfileDetails when the indexes were read.
|
||||
int64 expected_row_version = 4;
|
||||
}
|
||||
|
||||
message SetTableIndexesResponse {
|
||||
bool success = 1;
|
||||
repeated string indexes = 2;
|
||||
// New row version after the update, or the current version for a no-op.
|
||||
int64 row_version = 3;
|
||||
}
|
||||
|
||||
// One public option name. `value` identifies the option by its current public
|
||||
// alias and `alias` is its desired public alias; stored values remain internal.
|
||||
message OptionValueAlias {
|
||||
|
||||
Binary file not shown.
@@ -546,6 +546,9 @@ pub struct TableDetail {
|
||||
/// no longer available, while AddTableColumns remains available.
|
||||
#[prost(bool, tag = "12")]
|
||||
pub has_data: bool,
|
||||
/// User-managed single-column indexes. Backend-managed indexes are omitted.
|
||||
#[prost(string, repeated, tag = "13")]
|
||||
pub indexes: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
|
||||
}
|
||||
/// Server-owned behavior for one logical column returned in table details.
|
||||
#[derive(serde::Serialize, serde::Deserialize)]
|
||||
@@ -654,6 +657,32 @@ pub struct SetRowDisplayColumnsResponse {
|
||||
#[prost(int64, tag = "3")]
|
||||
pub row_version: i64,
|
||||
}
|
||||
/// Atomically replaces the table's user-managed single-column indexes. Indexes
|
||||
/// owned by the backend, including link and navigation indexes, are unchanged.
|
||||
#[derive(serde::Serialize, serde::Deserialize)]
|
||||
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
|
||||
pub struct SetTableIndexesRequest {
|
||||
#[prost(string, tag = "1")]
|
||||
pub profile_name: ::prost::alloc::string::String,
|
||||
#[prost(string, tag = "2")]
|
||||
pub table_name: ::prost::alloc::string::String,
|
||||
#[prost(string, repeated, tag = "3")]
|
||||
pub indexes: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
|
||||
/// Row version returned by GetProfileDetails when the indexes were read.
|
||||
#[prost(int64, tag = "4")]
|
||||
pub expected_row_version: i64,
|
||||
}
|
||||
#[derive(serde::Serialize, serde::Deserialize)]
|
||||
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
|
||||
pub struct SetTableIndexesResponse {
|
||||
#[prost(bool, tag = "1")]
|
||||
pub success: bool,
|
||||
#[prost(string, repeated, tag = "2")]
|
||||
pub indexes: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
|
||||
/// New row version after the update, or the current version for a no-op.
|
||||
#[prost(int64, tag = "3")]
|
||||
pub row_version: i64,
|
||||
}
|
||||
/// One public option name. `value` identifies the option by its current public
|
||||
/// alias and `alias` is its desired public alias; stored values remain internal.
|
||||
#[derive(serde::Serialize, serde::Deserialize)]
|
||||
@@ -1551,6 +1580,37 @@ pub mod table_definition_client {
|
||||
);
|
||||
self.inner.unary(req, path, codec).await
|
||||
}
|
||||
/// Replaces the user-managed indexes of an existing dynamic table. Physical
|
||||
/// indexes are created or dropped even when rows have already been stored.
|
||||
pub async fn set_table_indexes(
|
||||
&mut self,
|
||||
request: impl tonic::IntoRequest<super::SetTableIndexesRequest>,
|
||||
) -> std::result::Result<
|
||||
tonic::Response<super::SetTableIndexesResponse>,
|
||||
tonic::Status,
|
||||
> {
|
||||
self.inner
|
||||
.ready()
|
||||
.await
|
||||
.map_err(|e| {
|
||||
tonic::Status::unknown(
|
||||
format!("Service was not ready: {}", e.into()),
|
||||
)
|
||||
})?;
|
||||
let codec = tonic_prost::ProstCodec::default();
|
||||
let path = http::uri::PathAndQuery::from_static(
|
||||
"/komp_ac.table_definition.TableDefinition/SetTableIndexes",
|
||||
);
|
||||
let mut req = request.into_request();
|
||||
req.extensions_mut()
|
||||
.insert(
|
||||
GrpcMethod::new(
|
||||
"komp_ac.table_definition.TableDefinition",
|
||||
"SetTableIndexes",
|
||||
),
|
||||
);
|
||||
self.inner.unary(req, path, codec).await
|
||||
}
|
||||
/// Replaces the optional user-visible aliases for a fixed-option column.
|
||||
/// Stored values remain stable machine values and scripts never depend on labels.
|
||||
pub async fn set_column_option_aliases(
|
||||
@@ -1786,6 +1846,15 @@ pub mod table_definition_server {
|
||||
tonic::Response<super::SetRowDisplayColumnsResponse>,
|
||||
tonic::Status,
|
||||
>;
|
||||
/// Replaces the user-managed indexes of an existing dynamic table. Physical
|
||||
/// indexes are created or dropped even when rows have already been stored.
|
||||
async fn set_table_indexes(
|
||||
&self,
|
||||
request: tonic::Request<super::SetTableIndexesRequest>,
|
||||
) -> std::result::Result<
|
||||
tonic::Response<super::SetTableIndexesResponse>,
|
||||
tonic::Status,
|
||||
>;
|
||||
/// Replaces the optional user-visible aliases for a fixed-option column.
|
||||
/// Stored values remain stable machine values and scripts never depend on labels.
|
||||
async fn set_column_option_aliases(
|
||||
@@ -2572,6 +2641,52 @@ pub mod table_definition_server {
|
||||
};
|
||||
Box::pin(fut)
|
||||
}
|
||||
"/komp_ac.table_definition.TableDefinition/SetTableIndexes" => {
|
||||
#[allow(non_camel_case_types)]
|
||||
struct SetTableIndexesSvc<T: TableDefinition>(pub Arc<T>);
|
||||
impl<
|
||||
T: TableDefinition,
|
||||
> tonic::server::UnaryService<super::SetTableIndexesRequest>
|
||||
for SetTableIndexesSvc<T> {
|
||||
type Response = super::SetTableIndexesResponse;
|
||||
type Future = BoxFuture<
|
||||
tonic::Response<Self::Response>,
|
||||
tonic::Status,
|
||||
>;
|
||||
fn call(
|
||||
&mut self,
|
||||
request: tonic::Request<super::SetTableIndexesRequest>,
|
||||
) -> Self::Future {
|
||||
let inner = Arc::clone(&self.0);
|
||||
let fut = async move {
|
||||
<T as TableDefinition>::set_table_indexes(&inner, request)
|
||||
.await
|
||||
};
|
||||
Box::pin(fut)
|
||||
}
|
||||
}
|
||||
let accept_compression_encodings = self.accept_compression_encodings;
|
||||
let send_compression_encodings = self.send_compression_encodings;
|
||||
let max_decoding_message_size = self.max_decoding_message_size;
|
||||
let max_encoding_message_size = self.max_encoding_message_size;
|
||||
let inner = self.inner.clone();
|
||||
let fut = async move {
|
||||
let method = SetTableIndexesSvc(inner);
|
||||
let codec = tonic_prost::ProstCodec::default();
|
||||
let mut grpc = tonic::server::Grpc::new(codec)
|
||||
.apply_compression_config(
|
||||
accept_compression_encodings,
|
||||
send_compression_encodings,
|
||||
)
|
||||
.apply_max_message_size_config(
|
||||
max_decoding_message_size,
|
||||
max_encoding_message_size,
|
||||
);
|
||||
let res = grpc.unary(method, req).await;
|
||||
Ok(res)
|
||||
};
|
||||
Box::pin(fut)
|
||||
}
|
||||
"/komp_ac.table_definition.TableDefinition/SetColumnOptionAliases" => {
|
||||
#[allow(non_camel_case_types)]
|
||||
struct SetColumnOptionAliasesSvc<T: TableDefinition>(pub Arc<T>);
|
||||
|
||||
2
server
2
server
Submodule server updated: 6b63dde568...6dbaccc868
Reference in New Issue
Block a user