//! QueryResult for returning query execution results.

use stemedb_core::types::Assertion;

/// The result of executing a query.
#[derive(Debug, Clone)]
pub struct QueryResult {
    /// The matching assertions.
    pub assertions: Vec<Assertion>,

    /// Total number of matches (may be greater than assertions.len() if limited).
    pub total_count: usize,

    /// Whether there are more results beyond the limit.
    pub has_more: bool,
}

impl QueryResult {
    /// Create an empty result.
    pub fn empty() -> Self {
        Self { assertions: Vec::new(), total_count: 0, has_more: false }
    }

    /// Create a result with the given assertions.
    pub fn with_assertions(assertions: Vec<Assertion>) -> Self {
        let total_count = assertions.len();
        Self { assertions, total_count, has_more: false }
    }
}
