pub struct PlanStore {
pub db_path: PathBuf,
/* private fields */
}Expand description
Thread-safe SQLite plan store.
Fields§
§db_path: PathBufImplementations§
Source§impl PlanStore
impl PlanStore
Sourcepub fn open_default(data_dir: &Path) -> Result<Self>
pub fn open_default(data_dir: &Path) -> Result<Self>
Default path: {data_dir}/plans.sqlite.
Sourcepub fn migrate_json_dir(&self, plans_root: &Path) -> Result<usize>
pub fn migrate_json_dir(&self, plans_root: &Path) -> Result<usize>
Import legacy JSON plan files from data_dir/plans/<project_hash>/*.json.
pub fn upsert(&self, plan: &Plan) -> Result<()>
pub fn get(&self, plan_id: &str) -> Result<Option<Plan>>
pub fn list( &self, project_id: &str, filter_status: Option<&str>, limit: usize, ) -> Result<Vec<Plan>>
pub fn active(&self, project_id: &str) -> Result<Option<Plan>>
pub fn set_status(&self, plan_id: &str, status: PlanStatus) -> Result<()>
pub fn save_comments( &self, plan_id: &str, comments: Vec<PlanLineComment>, ) -> Result<()>
Trait Implementations§
Auto Trait Implementations§
impl Freeze for PlanStore
impl RefUnwindSafe for PlanStore
impl Send for PlanStore
impl Sync for PlanStore
impl Unpin for PlanStore
impl UnsafeUnpin for PlanStore
impl UnwindSafe for PlanStore
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