moving towards upgraded crates
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
// This file is @generated by prost-build.
|
||||
/// Request identifying the profile (schema) and tables to inspect.
|
||||
#[derive(Clone, PartialEq, ::prost::Message)]
|
||||
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
|
||||
pub struct GetTableStructureRequest {
|
||||
/// Required. Profile (PostgreSQL schema) name. Must exist in `schemas`.
|
||||
#[prost(string, tag = "1")]
|
||||
@@ -26,24 +26,25 @@ pub struct GetTableStructureResponse {
|
||||
pub struct TableStructureResponse {
|
||||
/// Columns of the physical table, including system columns (id, deleted,
|
||||
/// created_at), user-defined columns, and any foreign-key columns such as
|
||||
/// "<linked_table>_id". May be empty if the physical table is missing.
|
||||
/// "\<linked_table>\_id". May be empty if the physical table is missing.
|
||||
#[prost(message, repeated, tag = "1")]
|
||||
pub columns: ::prost::alloc::vec::Vec<TableColumn>,
|
||||
}
|
||||
/// One physical column entry as reported by information_schema.
|
||||
#[derive(Clone, PartialEq, ::prost::Message)]
|
||||
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
|
||||
pub struct TableColumn {
|
||||
/// Column name exactly as defined in PostgreSQL.
|
||||
#[prost(string, tag = "1")]
|
||||
pub name: ::prost::alloc::string::String,
|
||||
/// Normalized data type string derived from information_schema:
|
||||
/// - VARCHAR(n) when udt_name='varchar' with character_maximum_length
|
||||
/// - CHAR(n) when udt_name='bpchar' with character_maximum_length
|
||||
/// - NUMERIC(p,s) when udt_name='numeric' with precision and scale
|
||||
/// - NUMERIC(p) when udt_name='numeric' with precision only
|
||||
/// - <TYPE>\[\] for array types (udt_name starting with '_', e.g., INT\[\] )
|
||||
/// - Otherwise UPPER(udt_name), e.g., TEXT, BIGINT, TIMESTAMPTZ
|
||||
/// Examples: "TEXT", "BIGINT", "VARCHAR(255)", "TIMESTAMPTZ", "NUMERIC(14,4)"
|
||||
///
|
||||
/// * VARCHAR(n) when udt_name='varchar' with character_maximum_length
|
||||
/// * CHAR(n) when udt_name='bpchar' with character_maximum_length
|
||||
/// * NUMERIC(p,s) when udt_name='numeric' with precision and scale
|
||||
/// * NUMERIC(p) when udt_name='numeric' with precision only
|
||||
/// * <TYPE>\[\] for array types (udt_name starting with '\_', e.g., INT\[\] )
|
||||
/// * Otherwise UPPER(udt_name), e.g., TEXT, BIGINT, TIMESTAMPTZ
|
||||
/// Examples: "TEXT", "BIGINT", "VARCHAR(255)", "TIMESTAMPTZ", "NUMERIC(14,4)"
|
||||
#[prost(string, tag = "2")]
|
||||
pub data_type: ::prost::alloc::string::String,
|
||||
/// True if information_schema reports the column as nullable.
|
||||
@@ -68,10 +69,11 @@ pub mod table_structure_service_client {
|
||||
/// Introspects the physical PostgreSQL tables for one or more logical tables
|
||||
/// (defined in table_definitions) and returns their column structures.
|
||||
/// The server validates that:
|
||||
/// - The profile (schema) exists in `schemas`
|
||||
/// - Every table is defined for that profile in `table_definitions`
|
||||
/// It then queries information_schema for the physical tables and returns
|
||||
/// normalized column metadata.
|
||||
///
|
||||
/// * The profile (schema) exists in `schemas`
|
||||
/// * Every table is defined for that profile in `table_definitions`
|
||||
/// It then queries information_schema for the physical tables and returns
|
||||
/// normalized column metadata.
|
||||
#[derive(Debug, Clone)]
|
||||
pub struct TableStructureServiceClient<T> {
|
||||
inner: tonic::client::Grpc<T>,
|
||||
@@ -156,12 +158,13 @@ pub mod table_structure_service_client {
|
||||
/// nullability, primary key flag) for one or more tables in a profile.
|
||||
///
|
||||
/// Behavior:
|
||||
/// - NOT_FOUND if profile doesn't exist in `schemas`
|
||||
/// - NOT_FOUND if any table is not defined for that profile in `table_definitions`
|
||||
/// - Queries information_schema.columns ordered by ordinal position
|
||||
/// - Normalizes data_type text (details under TableColumn.data_type)
|
||||
/// - Returns an error if any validated table has no visible columns in
|
||||
/// information_schema (e.g., physical table missing)
|
||||
///
|
||||
/// * NOT_FOUND if profile doesn't exist in `schemas`
|
||||
/// * NOT_FOUND if any table is not defined for that profile in `table_definitions`
|
||||
/// * Queries information_schema.columns ordered by ordinal position
|
||||
/// * Normalizes data_type text (details under TableColumn.data_type)
|
||||
/// * Returns an error if any validated table has no visible columns in
|
||||
/// information_schema (e.g., physical table missing)
|
||||
pub async fn get_table_structure(
|
||||
&mut self,
|
||||
request: impl tonic::IntoRequest<super::GetTableStructureRequest>,
|
||||
@@ -177,7 +180,7 @@ pub mod table_structure_service_client {
|
||||
format!("Service was not ready: {}", e.into()),
|
||||
)
|
||||
})?;
|
||||
let codec = tonic::codec::ProstCodec::default();
|
||||
let codec = tonic_prost::ProstCodec::default();
|
||||
let path = http::uri::PathAndQuery::from_static(
|
||||
"/komp_ac.table_structure.TableStructureService/GetTableStructure",
|
||||
);
|
||||
@@ -210,12 +213,13 @@ pub mod table_structure_service_server {
|
||||
/// nullability, primary key flag) for one or more tables in a profile.
|
||||
///
|
||||
/// Behavior:
|
||||
/// - NOT_FOUND if profile doesn't exist in `schemas`
|
||||
/// - NOT_FOUND if any table is not defined for that profile in `table_definitions`
|
||||
/// - Queries information_schema.columns ordered by ordinal position
|
||||
/// - Normalizes data_type text (details under TableColumn.data_type)
|
||||
/// - Returns an error if any validated table has no visible columns in
|
||||
/// information_schema (e.g., physical table missing)
|
||||
///
|
||||
/// * NOT_FOUND if profile doesn't exist in `schemas`
|
||||
/// * NOT_FOUND if any table is not defined for that profile in `table_definitions`
|
||||
/// * Queries information_schema.columns ordered by ordinal position
|
||||
/// * Normalizes data_type text (details under TableColumn.data_type)
|
||||
/// * Returns an error if any validated table has no visible columns in
|
||||
/// information_schema (e.g., physical table missing)
|
||||
async fn get_table_structure(
|
||||
&self,
|
||||
request: tonic::Request<super::GetTableStructureRequest>,
|
||||
@@ -227,10 +231,11 @@ pub mod table_structure_service_server {
|
||||
/// Introspects the physical PostgreSQL tables for one or more logical tables
|
||||
/// (defined in table_definitions) and returns their column structures.
|
||||
/// The server validates that:
|
||||
/// - The profile (schema) exists in `schemas`
|
||||
/// - Every table is defined for that profile in `table_definitions`
|
||||
/// It then queries information_schema for the physical tables and returns
|
||||
/// normalized column metadata.
|
||||
///
|
||||
/// * The profile (schema) exists in `schemas`
|
||||
/// * Every table is defined for that profile in `table_definitions`
|
||||
/// It then queries information_schema for the physical tables and returns
|
||||
/// normalized column metadata.
|
||||
#[derive(Debug)]
|
||||
pub struct TableStructureServiceServer<T> {
|
||||
inner: Arc<T>,
|
||||
@@ -342,7 +347,7 @@ pub mod table_structure_service_server {
|
||||
let inner = self.inner.clone();
|
||||
let fut = async move {
|
||||
let method = GetTableStructureSvc(inner);
|
||||
let codec = tonic::codec::ProstCodec::default();
|
||||
let codec = tonic_prost::ProstCodec::default();
|
||||
let mut grpc = tonic::server::Grpc::new(codec)
|
||||
.apply_compression_config(
|
||||
accept_compression_encodings,
|
||||
|
||||
Reference in New Issue
Block a user