Skip to main content

TaskQueryRepository

Trait TaskQueryRepository 

Source
pub trait TaskQueryRepository {
    // Required methods
    fn resolve_task_id(&self, task_id_or_prefix: &str) -> Result<String>;
    fn load_task_summary(&self, task_id: &str) -> Result<TaskSummary>;
    fn load_task_detail_rows(&self, task_id: &str) -> Result<TaskDetailRows>;
    fn load_task_item_counts(&self, task_id: &str) -> Result<(i64, i64, i64)>;
    fn list_task_ids_ordered_by_created_desc(&self) -> Result<Vec<String>>;
    fn find_latest_resumable_task_id(
        &self,
        include_pending: bool,
    ) -> Result<Option<String>>;
    fn load_task_runtime_row(&self, task_id: &str) -> Result<TaskRuntimeRow>;
    fn load_task_status(&self, task_id: &str) -> Result<Option<String>>;
    fn load_task_name(&self, task_id: &str) -> Result<Option<String>>;
}
Expand description

Task discovery, lookup, and metadata queries.

Required Methods§

Source

fn resolve_task_id(&self, task_id_or_prefix: &str) -> Result<String>

Resolves a full task identifier from an exact ID or prefix.

Source

fn load_task_summary(&self, task_id: &str) -> Result<TaskSummary>

Loads the summary row for a task.

Source

fn load_task_detail_rows(&self, task_id: &str) -> Result<TaskDetailRows>

Loads the full detail row bundle for a task.

Source

fn load_task_item_counts(&self, task_id: &str) -> Result<(i64, i64, i64)>

Loads (total, resolved, unresolved) item counts for a task.

Source

fn list_task_ids_ordered_by_created_desc(&self) -> Result<Vec<String>>

Lists task identifiers ordered from newest to oldest.

Source

fn find_latest_resumable_task_id( &self, include_pending: bool, ) -> Result<Option<String>>

Returns the latest resumable task, optionally including pending tasks.

Source

fn load_task_runtime_row(&self, task_id: &str) -> Result<TaskRuntimeRow>

Loads execution state needed to resume a task.

Source

fn load_task_status(&self, task_id: &str) -> Result<Option<String>>

Loads the current task status string.

Source

fn load_task_name(&self, task_id: &str) -> Result<Option<String>>

Loads the human-readable name of a task.

Implementors§