pub struct Query {
pub query_type: String,
pub params: HashMap<String, Value>,
pub limit: Option<usize>,
pub offset: Option<usize>,
pub context_id: Option<ContextId>,
pub context_ids: Option<Vec<ContextId>>,
pub merge_results: bool,
}Expand description
Standard query request.
Fields§
§query_type: StringQuery type (e.g., “list”, “search”, “recent”, “related”, “temporal”).
params: HashMap<String, Value>Query-specific parameters.
limit: Option<usize>Maximum results.
offset: Option<usize>Offset for pagination.
context_id: Option<ContextId>Context to query in (None = current).
context_ids: Option<Vec<ContextId>>Multiple contexts for V2 multi-context queries.
merge_results: boolWhether to merge results from multiple contexts.
Implementations§
Source§impl Query
impl Query
Sourcepub fn in_context(self, context_id: ContextId) -> Self
pub fn in_context(self, context_id: ContextId) -> Self
Set context.
Sourcepub fn in_contexts(self, context_ids: Vec<ContextId>) -> Self
pub fn in_contexts(self, context_ids: Vec<ContextId>) -> Self
Set multiple contexts (V2 multi-context).
Sourcepub fn get_param<T: for<'de> Deserialize<'de>>(&self, key: &str) -> Option<T>
pub fn get_param<T: for<'de> Deserialize<'de>>(&self, key: &str) -> Option<T>
Get a parameter value.
Sourcepub fn get_string(&self, key: &str) -> Option<String>
pub fn get_string(&self, key: &str) -> Option<String>
Get a string parameter.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Query
impl<'de> Deserialize<'de> for Query
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for Query
impl RefUnwindSafe for Query
impl Send for Query
impl Sync for Query
impl Unpin for Query
impl UnsafeUnpin for Query
impl UnwindSafe for Query
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more