v archivation7 deleted data

This commit is contained in:
Priec
2026-08-11 23:45:09 +02:00
parent 672a6023b8
commit 7f931a7d6d
5 changed files with 123 additions and 7 deletions

View File

@@ -245,6 +245,45 @@ pub struct GetTableDataVersionRequest {
#[prost(int64, tag = "4")]
pub version: i64,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ResolvedTableLinkVersion {
#[prost(int64, tag = "1")]
pub version: i64,
#[prost(map = "string, string", tag = "2")]
pub data: ::std::collections::HashMap<
::prost::alloc::string::String,
::prost::alloc::string::String,
>,
#[prost(string, repeated, tag = "3")]
pub row_display_values: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
#[prost(string, repeated, tag = "4")]
pub row_display_columns: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ResolvedTableLinkUpdate {
#[prost(int64, tag = "1")]
pub version: i64,
#[prost(map = "string, string", tag = "2")]
pub data: ::std::collections::HashMap<
::prost::alloc::string::String,
::prost::alloc::string::String,
>,
#[prost(string, repeated, tag = "3")]
pub row_display_values: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
#[prost(string, repeated, tag = "4")]
pub changed_fields: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ResolvedTableLink {
#[prost(int64, tag = "1")]
pub id: i64,
#[prost(message, optional, tag = "2")]
pub saved: ::core::option::Option<ResolvedTableLinkVersion>,
#[prost(enumeration = "ResolvedTableLinkStatus", tag = "3")]
pub status: i32,
#[prost(message, optional, tag = "4")]
pub newer: ::core::option::Option<ResolvedTableLinkUpdate>,
}
/// Row payload: all columns returned as strings.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetTableDataResponse {
@@ -269,9 +308,16 @@ pub struct GetTableDataResponse {
pub row_display_values: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
#[prost(string, repeated, tag = "3")]
pub row_display_columns: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
/// Version paired with each global-link column in this row.
#[prost(map = "string, int64", tag = "4")]
pub link_versions: ::std::collections::HashMap<::prost::alloc::string::String, i64>,
/// Links keyed by their public column name. Each value contains the row as
/// saved by this record and the newest available state of the linked row.
#[prost(map = "string, message", tag = "4")]
pub resolved_links: ::std::collections::HashMap<
::prost::alloc::string::String,
ResolvedTableLink,
>,
/// The generation returned by this response. Zero is never returned.
#[prost(int64, tag = "5")]
pub row_version: i64,
}
/// Count non-deleted rows.
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
@@ -296,6 +342,41 @@ pub struct GetTableDataByPositionRequest {
#[prost(int32, tag = "3")]
pub position: i32,
}
/// A link resolved exactly as the source row stored it, together with the
/// target row's current state. The physical companion version column remains
/// an internal implementation detail.
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum ResolvedTableLinkStatus {
Current = 0,
Superseded = 1,
Unavailable = 2,
Deleted = 3,
}
impl ResolvedTableLinkStatus {
/// String value of the enum field names used in the ProtoBuf definition.
///
/// The values are not transformed in any way and thus are considered stable
/// (if the ProtoBuf definition does not change) and safe for programmatic use.
pub fn as_str_name(&self) -> &'static str {
match self {
Self::Current => "CURRENT",
Self::Superseded => "SUPERSEDED",
Self::Unavailable => "UNAVAILABLE",
Self::Deleted => "DELETED",
}
}
/// Creates an enum from field names used in the ProtoBuf definition.
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"CURRENT" => Some(Self::Current),
"SUPERSEDED" => Some(Self::Superseded),
"UNAVAILABLE" => Some(Self::Unavailable),
"DELETED" => Some(Self::Deleted),
_ => None,
}
}
}
/// Generated client implementations.
pub mod tables_data_client {
#![allow(