cipherstash_grpc/generated/
stash.grpc.v1.queries.rs

1#[derive(Clone, PartialEq, ::prost::Message)]
2pub struct Exact {
3    #[prost(bytes="vec", repeated, tag="1")]
4    pub term: ::prost::alloc::vec::Vec<::prost::alloc::vec::Vec<u8>>,
5}
6#[derive(Clone, PartialEq, ::prost::Message)]
7pub struct Range {
8    #[prost(bytes="vec", repeated, tag="1")]
9    pub upper: ::prost::alloc::vec::Vec<::prost::alloc::vec::Vec<u8>>,
10    #[prost(bytes="vec", repeated, tag="2")]
11    pub lower: ::prost::alloc::vec::Vec<::prost::alloc::vec::Vec<u8>>,
12}
13#[derive(Clone, PartialEq, ::prost::Message)]
14pub struct Filter {
15    #[prost(uint32, repeated, tag="1")]
16    pub bits: ::prost::alloc::vec::Vec<u32>,
17}
18#[derive(Clone, PartialEq, ::prost::Message)]
19pub struct Constraint {
20    #[prost(bytes="vec", tag="1")]
21    pub index_id: ::prost::alloc::vec::Vec<u8>,
22    #[prost(oneof="constraint::Condition", tags="2, 3, 4")]
23    pub condition: ::core::option::Option<constraint::Condition>,
24}
25/// Nested message and enum types in `Constraint`.
26pub mod constraint {
27    #[derive(Clone, PartialEq, ::prost::Oneof)]
28    pub enum Condition {
29        #[prost(message, tag="2")]
30        Exact(super::Exact),
31        #[prost(message, tag="3")]
32        Range(super::Range),
33        #[prost(message, tag="4")]
34        Filter(super::Filter),
35    }
36}
37#[derive(Clone, PartialEq, ::prost::Message)]
38pub struct Aggregate {
39    #[prost(enumeration="aggregate::AggregateType", tag="2")]
40    pub r#type: i32,
41}
42/// Nested message and enum types in `Aggregate`.
43pub mod aggregate {
44    #[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
45    #[repr(i32)]
46    pub enum AggregateType {
47        Count = 0,
48    }
49}
50#[derive(Clone, PartialEq, ::prost::Message)]
51pub struct Ordering {
52    #[prost(bytes="vec", tag="1")]
53    pub index_id: ::prost::alloc::vec::Vec<u8>,
54    #[prost(enumeration="ordering::Direction", tag="2")]
55    pub direction: i32,
56}
57/// Nested message and enum types in `Ordering`.
58pub mod ordering {
59    #[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
60    #[repr(i32)]
61    pub enum Direction {
62        Asc = 0,
63        Desc = 1,
64    }
65}
66//
67//Query protobuf
68//
69//`limit`: define the maximum records to be returned
70//`constraints`: constraints on the query (can be an empty list)
71//`aggregates`: aggregates for the given constraints (can be an empty list)
72//`skipResults`: if true then don't return the results (should be ignored if there are no aggregates)
73
74#[derive(Clone, PartialEq, ::prost::Message)]
75pub struct Query {
76    #[prost(uint32, tag="1")]
77    pub limit: u32,
78    #[prost(message, repeated, tag="2")]
79    pub constraints: ::prost::alloc::vec::Vec<Constraint>,
80    #[prost(message, repeated, tag="3")]
81    pub aggregates: ::prost::alloc::vec::Vec<Aggregate>,
82    #[prost(message, repeated, tag="4")]
83    pub ordering: ::prost::alloc::vec::Vec<Ordering>,
84    #[prost(bool, tag="5")]
85    pub skip_results: bool,
86    #[prost(uint32, tag="6")]
87    pub offset: u32,
88}
89#[derive(Clone, PartialEq, ::prost::Message)]
90pub struct QueryRequest {
91    #[prost(bytes="vec", tag="1")]
92    pub collection_id: ::prost::alloc::vec::Vec<u8>,
93    #[prost(message, optional, tag="2")]
94    pub query: ::core::option::Option<Query>,
95    #[prost(uint32, tag="3")]
96    pub schema_version: u32,
97}
98#[derive(Clone, PartialEq, ::prost::Message)]
99pub struct AggregateResult {
100    #[prost(string, tag="1")]
101    pub name: ::prost::alloc::string::String,
102    #[prost(uint64, tag="2")]
103    pub value: u64,
104}
105#[derive(Clone, PartialEq, ::prost::Message)]
106pub struct QueryReply {
107    #[prost(bytes="vec", repeated, tag="1")]
108    pub result: ::prost::alloc::vec::Vec<::prost::alloc::vec::Vec<u8>>,
109    #[prost(message, repeated, tag="2")]
110    pub aggregates: ::prost::alloc::vec::Vec<AggregateResult>,
111    #[prost(message, repeated, tag="3")]
112    pub records: ::prost::alloc::vec::Vec<super::documents::Document>,
113    #[prost(enumeration="query_reply::QueryError", tag="2048")]
114    pub error: i32,
115}
116/// Nested message and enum types in `QueryReply`.
117pub mod query_reply {
118    #[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
119    #[repr(i32)]
120    pub enum QueryError {
121        NoError = 0,
122        ErrUnknownSchemaVersion = 1,
123        ErrObsoleteSchemaVersion = 2,
124    }
125}