pub struct WorkflowStore { /* private fields */ }Expand description
Workflow storage layer
Implementations§
Source§impl WorkflowStore
impl WorkflowStore
Sourcepub fn new(pool: DatabasePool) -> Self
pub fn new(pool: DatabasePool) -> Self
Create a new workflow store
Sourcepub async fn create(&self, workflow: &Workflow) -> Result<WorkflowId>
pub async fn create(&self, workflow: &Workflow) -> Result<WorkflowId>
Create a new workflow
Sourcepub async fn list_paginated(
&self,
limit: i64,
offset: i64,
) -> Result<Vec<Workflow>>
pub async fn list_paginated( &self, limit: i64, offset: i64, ) -> Result<Vec<Workflow>>
List workflows with pagination
Sourcepub async fn update(&self, id: &WorkflowId, workflow: &Workflow) -> Result<bool>
pub async fn update(&self, id: &WorkflowId, workflow: &Workflow) -> Result<bool>
Update a workflow
Sourcepub async fn delete(&self, id: &WorkflowId) -> Result<bool>
pub async fn delete(&self, id: &WorkflowId) -> Result<bool>
Delete a workflow
Sourcepub async fn search(&self, query: &str) -> Result<Vec<Workflow>>
pub async fn search(&self, query: &str) -> Result<Vec<Workflow>>
Search workflows by name (case-insensitive)
Sourcepub async fn bulk_create(
&self,
workflows: &[Workflow],
) -> Result<Vec<BulkOperationResult>>
pub async fn bulk_create( &self, workflows: &[Workflow], ) -> Result<Vec<BulkOperationResult>>
Bulk create multiple workflows Returns a list of (id, success, error_message) tuples
Sourcepub async fn bulk_delete(
&self,
ids: &[WorkflowId],
) -> Result<Vec<BulkOperationResult>>
pub async fn bulk_delete( &self, ids: &[WorkflowId], ) -> Result<Vec<BulkOperationResult>>
Bulk delete multiple workflows by IDs Returns a list of (id, success, error_message) tuples
Sourcepub async fn bulk_export(
&self,
ids: Option<&[WorkflowId]>,
) -> Result<WorkflowExport>
pub async fn bulk_export( &self, ids: Option<&[WorkflowId]>, ) -> Result<WorkflowExport>
Bulk export workflows to JSON format
Sourcepub async fn bulk_import(
&self,
export: &WorkflowExport,
options: ImportOptions,
) -> Result<ImportResult>
pub async fn bulk_import( &self, export: &WorkflowExport, options: ImportOptions, ) -> Result<ImportResult>
Bulk import workflows from export format Returns import results with statistics
Sourcepub async fn list_by_tag(&self, tag: &str) -> Result<Vec<Workflow>>
pub async fn list_by_tag(&self, tag: &str) -> Result<Vec<Workflow>>
List workflows by tag Note: tags are stored as JSON array in SQLite
List workflows by multiple tags (AND logic - must have all tags)
Sourcepub async fn list_ids(&self) -> Result<Vec<WorkflowId>>
pub async fn list_ids(&self) -> Result<Vec<WorkflowId>>
Get workflow IDs only (for lighter queries)
Sourcepub async fn exists(&self, id: &WorkflowId) -> Result<bool>
pub async fn exists(&self, id: &WorkflowId) -> Result<bool>
Check if a workflow exists
Trait Implementations§
Source§impl Clone for WorkflowStore
impl Clone for WorkflowStore
Source§fn clone(&self) -> WorkflowStore
fn clone(&self) -> WorkflowStore
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for WorkflowStore
impl !RefUnwindSafe for WorkflowStore
impl Send for WorkflowStore
impl Sync for WorkflowStore
impl Unpin for WorkflowStore
impl !UnwindSafe for WorkflowStore
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
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