picker order by
This commit is contained in:
@@ -25,6 +25,18 @@ message SearchRequest {
|
||||
repeated ColumnConstraint must = 4;
|
||||
optional uint32 limit = 5;
|
||||
optional uint32 offset = 6;
|
||||
optional SearchOrder order = 7;
|
||||
}
|
||||
|
||||
message SearchOrder {
|
||||
string column = 1;
|
||||
SearchOrderDirection direction = 2;
|
||||
}
|
||||
|
||||
enum SearchOrderDirection {
|
||||
SEARCH_ORDER_DIRECTION_UNSPECIFIED = 0;
|
||||
SEARCH_ORDER_DIRECTION_ASC = 1;
|
||||
SEARCH_ORDER_DIRECTION_DESC = 2;
|
||||
}
|
||||
message SearchResponse {
|
||||
message Hit {
|
||||
@@ -35,6 +47,7 @@ message SearchResponse {
|
||||
// Configured human-readable value for this row.
|
||||
string row_display_value = 5;
|
||||
string row_display_column = 6;
|
||||
optional uint64 position = 7;
|
||||
}
|
||||
repeated Hit hits = 1;
|
||||
}
|
||||
|
||||
Binary file not shown.
@@ -22,6 +22,15 @@ pub struct SearchRequest {
|
||||
pub limit: ::core::option::Option<u32>,
|
||||
#[prost(uint32, optional, tag = "6")]
|
||||
pub offset: ::core::option::Option<u32>,
|
||||
#[prost(message, optional, tag = "7")]
|
||||
pub order: ::core::option::Option<SearchOrder>,
|
||||
}
|
||||
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
|
||||
pub struct SearchOrder {
|
||||
#[prost(string, tag = "1")]
|
||||
pub column: ::prost::alloc::string::String,
|
||||
#[prost(enumeration = "SearchOrderDirection", tag = "2")]
|
||||
pub direction: i32,
|
||||
}
|
||||
#[derive(Clone, PartialEq, ::prost::Message)]
|
||||
pub struct SearchResponse {
|
||||
@@ -46,6 +55,8 @@ pub mod search_response {
|
||||
pub row_display_value: ::prost::alloc::string::String,
|
||||
#[prost(string, tag = "6")]
|
||||
pub row_display_column: ::prost::alloc::string::String,
|
||||
#[prost(uint64, optional, tag = "7")]
|
||||
pub position: ::core::option::Option<u64>,
|
||||
}
|
||||
}
|
||||
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
|
||||
@@ -77,6 +88,35 @@ impl MatchMode {
|
||||
}
|
||||
}
|
||||
}
|
||||
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
|
||||
#[repr(i32)]
|
||||
pub enum SearchOrderDirection {
|
||||
Unspecified = 0,
|
||||
Asc = 1,
|
||||
Desc = 2,
|
||||
}
|
||||
impl SearchOrderDirection {
|
||||
/// 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::Unspecified => "SEARCH_ORDER_DIRECTION_UNSPECIFIED",
|
||||
Self::Asc => "SEARCH_ORDER_DIRECTION_ASC",
|
||||
Self::Desc => "SEARCH_ORDER_DIRECTION_DESC",
|
||||
}
|
||||
}
|
||||
/// Creates an enum from field names used in the ProtoBuf definition.
|
||||
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
|
||||
match value {
|
||||
"SEARCH_ORDER_DIRECTION_UNSPECIFIED" => Some(Self::Unspecified),
|
||||
"SEARCH_ORDER_DIRECTION_ASC" => Some(Self::Asc),
|
||||
"SEARCH_ORDER_DIRECTION_DESC" => Some(Self::Desc),
|
||||
_ => None,
|
||||
}
|
||||
}
|
||||
}
|
||||
/// Generated client implementations.
|
||||
pub mod searcher_client {
|
||||
#![allow(
|
||||
|
||||
Reference in New Issue
Block a user