hypercall_db/traits/bootstrap.rs
1//! Bootstrap traits for startup-time data loading.
2//!
3//! These provide one-shot initialization queries used during server startup
4//! to populate in-memory caches and engine state.
5
6use anyhow::Result;
7
8use crate::InstrumentRecord;
9
10/// Read-only bootstrap queries for server startup.
11#[async_trait::async_trait]
12pub trait BootstrapReader: Send + Sync {
13 /// Load all active instruments (status = 'ACTIVE').
14 async fn get_all_active_instruments(&self) -> Result<Vec<InstrumentRecord>>;
15
16 /// Load all instruments regardless of status.
17 async fn get_all_instruments(&self) -> Result<Vec<InstrumentRecord>>;
18
19 /// Count of all instruments in the database.
20 async fn get_instrument_count(&self) -> Result<i64>;
21}