pub struct QueryRuntime {
pub id: String,
pub query: String,
pub status: ComponentStatus,
pub error_message: Option<String>,
pub source_subscriptions: Vec<SourceSubscriptionConfig>,
pub joins: Option<Vec<QueryJoinConfig>>,
}Expand description
Runtime representation of a query with execution status
QueryRuntime combines query configuration with runtime state information.
Used for monitoring query execution, tracking which sources it subscribes to,
and inspecting any runtime errors.
§Status Values
ComponentStatus::Stopped: Query is configured but not processingComponentStatus::Starting: Query is initializing (bootstrap phase)ComponentStatus::Running: Query is actively processing eventsComponentStatus::Error: Query encountered an error (seeerror_message)
§Examples
use drasi_lib::{DrasiLib, ComponentStatus};
let core = DrasiLib::builder().with_id("my-server").build().await?;
core.start().await?;
// Get runtime information for a query
let query_info = core.get_query_info("active_orders").await?;
println!("Query: {}", query_info.query);
println!("Status: {:?}", query_info.status);
println!("Source subscriptions: {:?}", query_info.source_subscriptions);
if let Some(joins) = query_info.joins {
println!("Synthetic joins configured: {}", joins.len());
}Fields§
§id: StringUnique identifier for the query
query: StringCypher or GQL query string
status: ComponentStatusCurrent status of the query
error_message: Option<String>Error message if status is Error
source_subscriptions: Vec<SourceSubscriptionConfig>Source subscriptions with middleware pipelines
joins: Option<Vec<QueryJoinConfig>>Optional synthetic joins for the query
Trait Implementations§
Source§impl Clone for QueryRuntime
impl Clone for QueryRuntime
Source§fn clone(&self) -> QueryRuntime
fn clone(&self) -> QueryRuntime
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for QueryRuntime
impl Debug for QueryRuntime
Source§impl<'de> Deserialize<'de> for QueryRuntime
impl<'de> Deserialize<'de> for QueryRuntime
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
Source§impl From<QueryConfig> for QueryRuntime
impl From<QueryConfig> for QueryRuntime
Source§fn from(config: QueryConfig) -> Self
fn from(config: QueryConfig) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for QueryRuntime
impl RefUnwindSafe for QueryRuntime
impl Send for QueryRuntime
impl Sync for QueryRuntime
impl Unpin for QueryRuntime
impl UnwindSafe for QueryRuntime
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