row_display_columns can be changed anytime, whenever
This commit is contained in:
Submodule client-gui2 updated: c4d5a9d22b...fbb1931580
@@ -62,6 +62,10 @@ service TableDefinition {
|
|||||||
// Physical column names and identities remain unchanged.
|
// Physical column names and identities remain unchanged.
|
||||||
rpc SetColumnPresentation(SetColumnPresentationRequest) returns (SetColumnPresentationResponse);
|
rpc SetColumnPresentation(SetColumnPresentationRequest) returns (SetColumnPresentationResponse);
|
||||||
|
|
||||||
|
// Replaces the columns whose values identify rows to users. This is
|
||||||
|
// presentation metadata and may be changed after rows have been stored.
|
||||||
|
rpc SetRowDisplayColumns(SetRowDisplayColumnsRequest) returns (SetRowDisplayColumnsResponse);
|
||||||
|
|
||||||
// Replaces the optional user-visible aliases for a fixed-option column.
|
// Replaces the optional user-visible aliases for a fixed-option column.
|
||||||
// Stored values remain stable machine values and scripts never depend on labels.
|
// Stored values remain stable machine values and scripts never depend on labels.
|
||||||
rpc SetColumnOptionAliases(SetColumnOptionAliasesRequest) returns (SetColumnOptionAliasesResponse);
|
rpc SetColumnOptionAliases(SetColumnOptionAliasesRequest) returns (SetColumnOptionAliasesResponse);
|
||||||
@@ -587,6 +591,23 @@ message SetColumnPresentationResponse {
|
|||||||
int64 row_version = 4;
|
int64 row_version = 4;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Atomically replaces the columns whose values identify rows in pickers and
|
||||||
|
// link labels. Their order is the order in which their values are displayed.
|
||||||
|
message SetRowDisplayColumnsRequest {
|
||||||
|
string profile_name = 1;
|
||||||
|
string table_name = 2;
|
||||||
|
repeated string row_display_columns = 3;
|
||||||
|
// Row version returned by GetProfileDetails when this metadata was read.
|
||||||
|
int64 expected_row_version = 4;
|
||||||
|
}
|
||||||
|
|
||||||
|
message SetRowDisplayColumnsResponse {
|
||||||
|
bool success = 1;
|
||||||
|
repeated string row_display_columns = 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
|
// One public option name. `value` identifies the option by its current public
|
||||||
// alias and `alias` is its desired public alias; stored values remain internal.
|
// alias and `alias` is its desired public alias; stored values remain internal.
|
||||||
message OptionValueAlias {
|
message OptionValueAlias {
|
||||||
|
|||||||
Binary file not shown.
@@ -628,6 +628,32 @@ pub struct SetColumnPresentationResponse {
|
|||||||
#[prost(int64, tag = "4")]
|
#[prost(int64, tag = "4")]
|
||||||
pub row_version: i64,
|
pub row_version: i64,
|
||||||
}
|
}
|
||||||
|
/// Atomically replaces the columns whose values identify rows in pickers and
|
||||||
|
/// link labels. Their order is the order in which their values are displayed.
|
||||||
|
#[derive(serde::Serialize, serde::Deserialize)]
|
||||||
|
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
|
||||||
|
pub struct SetRowDisplayColumnsRequest {
|
||||||
|
#[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 row_display_columns: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
|
||||||
|
/// Row version returned by GetProfileDetails when this metadata was read.
|
||||||
|
#[prost(int64, tag = "4")]
|
||||||
|
pub expected_row_version: i64,
|
||||||
|
}
|
||||||
|
#[derive(serde::Serialize, serde::Deserialize)]
|
||||||
|
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
|
||||||
|
pub struct SetRowDisplayColumnsResponse {
|
||||||
|
#[prost(bool, tag = "1")]
|
||||||
|
pub success: bool,
|
||||||
|
#[prost(string, repeated, tag = "2")]
|
||||||
|
pub row_display_columns: ::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
|
/// One public option name. `value` identifies the option by its current public
|
||||||
/// alias and `alias` is its desired public alias; stored values remain internal.
|
/// alias and `alias` is its desired public alias; stored values remain internal.
|
||||||
#[derive(serde::Serialize, serde::Deserialize)]
|
#[derive(serde::Serialize, serde::Deserialize)]
|
||||||
@@ -1494,6 +1520,37 @@ pub mod table_definition_client {
|
|||||||
);
|
);
|
||||||
self.inner.unary(req, path, codec).await
|
self.inner.unary(req, path, codec).await
|
||||||
}
|
}
|
||||||
|
/// Replaces the columns whose values identify rows to users. This is
|
||||||
|
/// presentation metadata and may be changed after rows have been stored.
|
||||||
|
pub async fn set_row_display_columns(
|
||||||
|
&mut self,
|
||||||
|
request: impl tonic::IntoRequest<super::SetRowDisplayColumnsRequest>,
|
||||||
|
) -> std::result::Result<
|
||||||
|
tonic::Response<super::SetRowDisplayColumnsResponse>,
|
||||||
|
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/SetRowDisplayColumns",
|
||||||
|
);
|
||||||
|
let mut req = request.into_request();
|
||||||
|
req.extensions_mut()
|
||||||
|
.insert(
|
||||||
|
GrpcMethod::new(
|
||||||
|
"komp_ac.table_definition.TableDefinition",
|
||||||
|
"SetRowDisplayColumns",
|
||||||
|
),
|
||||||
|
);
|
||||||
|
self.inner.unary(req, path, codec).await
|
||||||
|
}
|
||||||
/// Replaces the optional user-visible aliases for a fixed-option column.
|
/// Replaces the optional user-visible aliases for a fixed-option column.
|
||||||
/// Stored values remain stable machine values and scripts never depend on labels.
|
/// Stored values remain stable machine values and scripts never depend on labels.
|
||||||
pub async fn set_column_option_aliases(
|
pub async fn set_column_option_aliases(
|
||||||
@@ -1720,6 +1777,15 @@ pub mod table_definition_server {
|
|||||||
tonic::Response<super::SetColumnPresentationResponse>,
|
tonic::Response<super::SetColumnPresentationResponse>,
|
||||||
tonic::Status,
|
tonic::Status,
|
||||||
>;
|
>;
|
||||||
|
/// Replaces the columns whose values identify rows to users. This is
|
||||||
|
/// presentation metadata and may be changed after rows have been stored.
|
||||||
|
async fn set_row_display_columns(
|
||||||
|
&self,
|
||||||
|
request: tonic::Request<super::SetRowDisplayColumnsRequest>,
|
||||||
|
) -> std::result::Result<
|
||||||
|
tonic::Response<super::SetRowDisplayColumnsResponse>,
|
||||||
|
tonic::Status,
|
||||||
|
>;
|
||||||
/// Replaces the optional user-visible aliases for a fixed-option column.
|
/// Replaces the optional user-visible aliases for a fixed-option column.
|
||||||
/// Stored values remain stable machine values and scripts never depend on labels.
|
/// Stored values remain stable machine values and scripts never depend on labels.
|
||||||
async fn set_column_option_aliases(
|
async fn set_column_option_aliases(
|
||||||
@@ -2457,6 +2523,55 @@ pub mod table_definition_server {
|
|||||||
};
|
};
|
||||||
Box::pin(fut)
|
Box::pin(fut)
|
||||||
}
|
}
|
||||||
|
"/komp_ac.table_definition.TableDefinition/SetRowDisplayColumns" => {
|
||||||
|
#[allow(non_camel_case_types)]
|
||||||
|
struct SetRowDisplayColumnsSvc<T: TableDefinition>(pub Arc<T>);
|
||||||
|
impl<
|
||||||
|
T: TableDefinition,
|
||||||
|
> tonic::server::UnaryService<super::SetRowDisplayColumnsRequest>
|
||||||
|
for SetRowDisplayColumnsSvc<T> {
|
||||||
|
type Response = super::SetRowDisplayColumnsResponse;
|
||||||
|
type Future = BoxFuture<
|
||||||
|
tonic::Response<Self::Response>,
|
||||||
|
tonic::Status,
|
||||||
|
>;
|
||||||
|
fn call(
|
||||||
|
&mut self,
|
||||||
|
request: tonic::Request<super::SetRowDisplayColumnsRequest>,
|
||||||
|
) -> Self::Future {
|
||||||
|
let inner = Arc::clone(&self.0);
|
||||||
|
let fut = async move {
|
||||||
|
<T as TableDefinition>::set_row_display_columns(
|
||||||
|
&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 = SetRowDisplayColumnsSvc(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" => {
|
"/komp_ac.table_definition.TableDefinition/SetColumnOptionAliases" => {
|
||||||
#[allow(non_camel_case_types)]
|
#[allow(non_camel_case_types)]
|
||||||
struct SetColumnOptionAliasesSvc<T: TableDefinition>(pub Arc<T>);
|
struct SetColumnOptionAliasesSvc<T: TableDefinition>(pub Arc<T>);
|
||||||
|
|||||||
2
server
2
server
Submodule server updated: 466aa31dab...6b63dde568
Reference in New Issue
Block a user