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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more