pub struct SqliteSystemDatabase { /* private fields */ }Implementations§
Source§impl SqliteSystemDatabase
impl SqliteSystemDatabase
pub async fn connect(database_url: &str) -> Result<Self, JournioError>
pub fn pool(&self) -> &SqlitePool
Trait Implementations§
Source§impl SystemDatabase for SqliteSystemDatabase
impl SystemDatabase for SqliteSystemDatabase
Source§fn migrate<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = JournioResult<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn migrate<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = JournioResult<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Create schema + run any pending migrations (mirrors
runMigrations).Source§fn launch<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = JournioResult<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn launch<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = JournioResult<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Boot the background loops: notification listener (LISTEN/NOTIFY or
polling), queue pollers, etc. Mirrors
systemDB.launch.Source§fn shutdown<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = JournioResult<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn shutdown<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = JournioResult<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Graceful shutdown of background loops.
Source§fn init_workflow<'life0, 'async_trait>(
&'life0 self,
init: InitWorkflow,
) -> Pin<Box<dyn Future<Output = JournioResult<InitWorkflowResult>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn init_workflow<'life0, 'async_trait>(
&'life0 self,
init: InitWorkflow,
) -> Pin<Box<dyn Future<Output = JournioResult<InitWorkflowResult>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Insert a workflow_status row (or upsert on ID conflict). Returns the
actual status after upsert — ported from
insertWorkflowStatus
(system_database.go:936). Surfaces QueueDeduplicated on unique
constraint violation of (queue_name, deduplication_id) and
ConflictingWorkflow if name/queue mismatch an existing row.Source§fn record_workflow_result<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
workflow_id: &'life1 str,
status: WorkflowStatusType,
output: Option<&'life2 Interchange>,
error: Option<&'life3 str>,
) -> Pin<Box<dyn Future<Output = JournioResult<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
fn record_workflow_result<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
workflow_id: &'life1 str,
status: WorkflowStatusType,
output: Option<&'life2 Interchange>,
error: Option<&'life3 str>,
) -> Pin<Box<dyn Future<Output = JournioResult<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
Persist terminal result/error — ported from
recordWorkflowResult.Source§fn get_workflow_status<'life0, 'life1, 'async_trait>(
&'life0 self,
workflow_id: &'life1 str,
) -> Pin<Box<dyn Future<Output = JournioResult<Option<WorkflowStatus>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn get_workflow_status<'life0, 'life1, 'async_trait>(
&'life0 self,
workflow_id: &'life1 str,
) -> Pin<Box<dyn Future<Output = JournioResult<Option<WorkflowStatus>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Read full status — ported from
getWorkflowStatus-style single-row
selects scattered through system_database.go.Source§fn list_workflows<'life0, 'async_trait>(
&'life0 self,
limit: i64,
) -> Pin<Box<dyn Future<Output = JournioResult<Vec<WorkflowStatus>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn list_workflows<'life0, 'async_trait>(
&'life0 self,
limit: i64,
) -> Pin<Box<dyn Future<Output = JournioResult<Vec<WorkflowStatus>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
List workflows (filters optional) — ported from
listWorkflows
(system_database.go:1184). The limit/offset filtering grows as the
port progresses; for now a simple cap.Source§fn cancel_workflows<'life0, 'life1, 'async_trait>(
&'life0 self,
workflow_ids: &'life1 [String],
) -> Pin<Box<dyn Future<Output = JournioResult<Vec<String>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn cancel_workflows<'life0, 'life1, 'async_trait>(
&'life0 self,
workflow_ids: &'life1 [String],
) -> Pin<Box<dyn Future<Output = JournioResult<Vec<String>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Cancel the provided workflows, leaving terminal rows untouched.
Returns the subset of IDs that already existed.
Source§fn resume_workflows<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
workflow_ids: &'life1 [String],
queue_name: Option<&'life2 str>,
) -> Pin<Box<dyn Future<Output = JournioResult<Vec<String>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn resume_workflows<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
workflow_ids: &'life1 [String],
queue_name: Option<&'life2 str>,
) -> Pin<Box<dyn Future<Output = JournioResult<Vec<String>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Resume the provided workflows onto
queue_name, or the internal queue
if None. Returns the subset of IDs that already existed.Source§fn get_workflow_children<'life0, 'life1, 'async_trait>(
&'life0 self,
workflow_id: &'life1 str,
) -> Pin<Box<dyn Future<Output = JournioResult<Vec<WorkflowStatus>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn get_workflow_children<'life0, 'life1, 'async_trait>(
&'life0 self,
workflow_id: &'life1 str,
) -> Pin<Box<dyn Future<Output = JournioResult<Vec<WorkflowStatus>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Recursively list all descendant workflows of
workflow_id.Source§fn fork_workflow<'life0, 'async_trait>(
&'life0 self,
input: ForkWorkflow,
) -> Pin<Box<dyn Future<Output = JournioResult<String>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn fork_workflow<'life0, 'async_trait>(
&'life0 self,
input: ForkWorkflow,
) -> Pin<Box<dyn Future<Output = JournioResult<String>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Fork a workflow by cloning its durable state and enqueueing a new run.
Source§fn get_queue<'life0, 'life1, 'async_trait>(
&'life0 self,
queue_name: &'life1 str,
) -> Pin<Box<dyn Future<Output = JournioResult<Option<QueueConfig>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn get_queue<'life0, 'life1, 'async_trait>(
&'life0 self,
queue_name: &'life1 str,
) -> Pin<Box<dyn Future<Output = JournioResult<Option<QueueConfig>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Retrieve persisted queue configuration by name.
Source§fn upsert_queue<'life0, 'life1, 'async_trait>(
&'life0 self,
queue: &'life1 QueueConfig,
) -> Pin<Box<dyn Future<Output = JournioResult<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn upsert_queue<'life0, 'life1, 'async_trait>(
&'life0 self,
queue: &'life1 QueueConfig,
) -> Pin<Box<dyn Future<Output = JournioResult<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Create or replace persisted queue configuration.
Source§fn record_step_output<'life0, 'life1, 'async_trait>(
&'life0 self,
step: &'life1 StepRecord,
) -> Pin<Box<dyn Future<Output = JournioResult<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn record_step_output<'life0, 'life1, 'async_trait>(
&'life0 self,
step: &'life1 StepRecord,
) -> Pin<Box<dyn Future<Output = JournioResult<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Insert or read-back a completed step — ported from
recordStepResult / checkStepExecution.Source§fn get_steps<'life0, 'life1, 'async_trait>(
&'life0 self,
workflow_id: &'life1 str,
) -> Pin<Box<dyn Future<Output = JournioResult<Vec<StepRecord>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn get_steps<'life0, 'life1, 'async_trait>(
&'life0 self,
workflow_id: &'life1 str,
) -> Pin<Box<dyn Future<Output = JournioResult<Vec<StepRecord>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Fetch all recorded steps for replay — ported from the recovery path
in
workflow.go + system_database.go.Source§fn dequeue_workflow<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
queue_name: &'life1 str,
executor_id: &'life2 str,
) -> Pin<Box<dyn Future<Output = JournioResult<Option<WorkflowStatus>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn dequeue_workflow<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
queue_name: &'life1 str,
executor_id: &'life2 str,
) -> Pin<Box<dyn Future<Output = JournioResult<Option<WorkflowStatus>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Atomically dequeue the next runnable workflow for
queue_name
(Postgres: FOR UPDATE SKIP LOCKED). Ported from workflowQueue.loop.Source§fn list_runnable_queues<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = JournioResult<Vec<String>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn list_runnable_queues<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = JournioResult<Vec<String>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
List queue names that currently have runnable or future queued work.
Source§fn list_queues<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = JournioResult<Vec<QueueConfig>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn list_queues<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = JournioResult<Vec<QueueConfig>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
List all registered queues from the
queues table — ported from
listQueues (system_database.go:4434). Used by the admin server’s
queue-metadata endpoint.Source§fn send<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
destination_id: &'life1 str,
topic: &'life2 str,
message: &'life3 Interchange,
) -> Pin<Box<dyn Future<Output = JournioResult<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
fn send<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
destination_id: &'life1 str,
topic: &'life2 str,
message: &'life3 Interchange,
) -> Pin<Box<dyn Future<Output = JournioResult<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
Send a message — ported from send (system_database.go:3346).
Inserts a row into notifications. An empty topic is stored as the
null topic. Returns NonExistentWorkflowError when the destination
workflow does not exist (FK violation).Source§fn consume_notification<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
workflow_id: &'life1 str,
topic: &'life2 str,
) -> Pin<Box<dyn Future<Output = JournioResult<Option<Notification>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn consume_notification<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
workflow_id: &'life1 str,
topic: &'life2 str,
) -> Pin<Box<dyn Future<Output = JournioResult<Option<Notification>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Atomically consume the oldest unconsumed message on
topic destined
for workflow_id — ported from the consume half of recv
(system_database.go:3378). Non-blocking: returns None when no
message is available. The polling/timeout loop lives in
crate::context::WorkflowContext::recv.Source§fn set_event<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
workflow_id: &'life1 str,
key: &'life2 str,
value: &'life3 Interchange,
function_id: i32,
) -> Pin<Box<dyn Future<Output = JournioResult<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
fn set_event<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
workflow_id: &'life1 str,
key: &'life2 str,
value: &'life3 Interchange,
function_id: i32,
) -> Pin<Box<dyn Future<Output = JournioResult<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
SetEvent — ported from setEvent (system_database.go:3573).
Upserts workflow_events and appends workflow_events_history
(keyed by function_id, the calling step id).Source§fn get_event_value<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
workflow_id: &'life1 str,
key: &'life2 str,
) -> Pin<Box<dyn Future<Output = JournioResult<Option<Interchange>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn get_event_value<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
workflow_id: &'life1 str,
key: &'life2 str,
) -> Pin<Box<dyn Future<Output = JournioResult<Option<Interchange>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Read the current value of event
key for workflow_id — ported from
the query half of getEvent (system_database.go:3615). Non-blocking:
returns None when the key is unset. The polling/timeout loop lives in
crate::context::WorkflowContext::get_event.Source§fn write_stream<'life0, 'life1, 'life2, 'life3, 'life4, 'async_trait>(
&'life0 self,
workflow_id: &'life1 str,
key: &'life2 str,
value: &'life3 str,
function_id: i32,
serialization: Option<&'life4 str>,
) -> Pin<Box<dyn Future<Output = JournioResult<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
'life4: 'async_trait,
fn write_stream<'life0, 'life1, 'life2, 'life3, 'life4, 'async_trait>(
&'life0 self,
workflow_id: &'life1 str,
key: &'life2 str,
value: &'life3 str,
function_id: i32,
serialization: Option<&'life4 str>,
) -> Pin<Box<dyn Future<Output = JournioResult<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
'life4: 'async_trait,
Append one serialized value to a durable stream within a workflow.
Source§fn read_stream<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
workflow_id: &'life1 str,
key: &'life2 str,
from_offset: i64,
) -> Pin<Box<dyn Future<Output = JournioResult<(Vec<StreamEntry>, bool)>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn read_stream<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
workflow_id: &'life1 str,
key: &'life2 str,
from_offset: i64,
) -> Pin<Box<dyn Future<Output = JournioResult<(Vec<StreamEntry>, bool)>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Read stream entries from
from_offset, ordered by offset. Returns the
drained entries plus whether the stream has been closed.Source§fn get_workflows_for_recovery<'life0, 'life1, 'async_trait>(
&'life0 self,
executor_id: &'life1 str,
) -> Pin<Box<dyn Future<Output = JournioResult<Vec<WorkflowStatus>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn get_workflows_for_recovery<'life0, 'life1, 'async_trait>(
&'life0 self,
executor_id: &'life1 str,
) -> Pin<Box<dyn Future<Output = JournioResult<Vec<WorkflowStatus>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Workflows left PENDING for this executor at startup — ported from
workflowRecovery in recovery.go + system_database.go.Source§fn delete_workflows_before<'life0, 'async_trait>(
&'life0 self,
before: DateTime<Utc>,
) -> Pin<Box<dyn Future<Output = JournioResult<u64>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn delete_workflows_before<'life0, 'async_trait>(
&'life0 self,
before: DateTime<Utc>,
) -> Pin<Box<dyn Future<Output = JournioResult<u64>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Delete completed workflows older than
before — ported from
permanentDeleteWorkflows.Source§fn upsert_schedule<'life0, 'life1, 'async_trait>(
&'life0 self,
schedule: &'life1 WorkflowSchedule,
) -> Pin<Box<dyn Future<Output = JournioResult<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn upsert_schedule<'life0, 'life1, 'async_trait>(
&'life0 self,
schedule: &'life1 WorkflowSchedule,
) -> Pin<Box<dyn Future<Output = JournioResult<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Create or replace a workflow schedule definition.
Source§fn list_schedules<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = JournioResult<Vec<WorkflowSchedule>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn list_schedules<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = JournioResult<Vec<WorkflowSchedule>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
List all persisted schedule definitions.
Source§fn update_schedule_last_fired_at<'life0, 'life1, 'async_trait>(
&'life0 self,
schedule_name: &'life1 str,
fired_at: DateTime<Utc>,
) -> Pin<Box<dyn Future<Output = JournioResult<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn update_schedule_last_fired_at<'life0, 'life1, 'async_trait>(
&'life0 self,
schedule_name: &'life1 str,
fired_at: DateTime<Utc>,
) -> Pin<Box<dyn Future<Output = JournioResult<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Update the last-fired timestamp after a successful trigger/backfill pass.
Source§fn get_schedule<'life0, 'life1, 'async_trait>(
&'life0 self,
schedule_name: &'life1 str,
) -> Pin<Box<dyn Future<Output = JournioResult<Option<WorkflowSchedule>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn get_schedule<'life0, 'life1, 'async_trait>(
&'life0 self,
schedule_name: &'life1 str,
) -> Pin<Box<dyn Future<Output = JournioResult<Option<WorkflowSchedule>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Fetch a single schedule by name — ported from the
ScheduleNamePrefixes branch of listSchedules
(system_database.go:4766). Returns None if no schedule matches.Source§fn delete_schedule<'life0, 'life1, 'async_trait>(
&'life0 self,
schedule_name: &'life1 str,
) -> Pin<Box<dyn Future<Output = JournioResult<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn delete_schedule<'life0, 'life1, 'async_trait>(
&'life0 self,
schedule_name: &'life1 str,
) -> Pin<Box<dyn Future<Output = JournioResult<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Delete a schedule by name — ported from
deleteSchedule
(system_database.go:4928).Source§fn update_schedule_status<'life0, 'life1, 'async_trait>(
&'life0 self,
schedule_name: &'life1 str,
status: ScheduleStatus,
) -> Pin<Box<dyn Future<Output = JournioResult<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn update_schedule_status<'life0, 'life1, 'async_trait>(
&'life0 self,
schedule_name: &'life1 str,
status: ScheduleStatus,
) -> Pin<Box<dyn Future<Output = JournioResult<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Update only a schedule’s status — ported from
updateSchedule
(system_database.go). Used by pause/resume.Source§fn create_application_version<'life0, 'life1, 'async_trait>(
&'life0 self,
version_name: &'life1 str,
) -> Pin<Box<dyn Future<Output = JournioResult<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn create_application_version<'life0, 'life1, 'async_trait>(
&'life0 self,
version_name: &'life1 str,
) -> Pin<Box<dyn Future<Output = JournioResult<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Register a new application version (no-op if the name already exists).
Ported from
createApplicationVersion.Source§fn update_application_version_timestamp<'life0, 'life1, 'async_trait>(
&'life0 self,
version_name: &'life1 str,
timestamp_ms: i64,
) -> Pin<Box<dyn Future<Output = JournioResult<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn update_application_version_timestamp<'life0, 'life1, 'async_trait>(
&'life0 self,
version_name: &'life1 str,
timestamp_ms: i64,
) -> Pin<Box<dyn Future<Output = JournioResult<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Bump a version’s timestamp, marking it as latest. Ported from
updateApplicationVersionTimestamp.Source§fn list_application_versions<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = JournioResult<Vec<VersionInfo>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn list_application_versions<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = JournioResult<Vec<VersionInfo>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
All registered versions, newest first — ported from
listApplicationVersions (system_database.go:5174).Source§fn get_latest_application_version<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = JournioResult<Option<VersionInfo>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn get_latest_application_version<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = JournioResult<Option<VersionInfo>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
The version with the greatest timestamp — ported from
getLatestApplicationVersion. Returns None when none are registered.Source§fn set_workflow_delay<'life0, 'life1, 'async_trait>(
&'life0 self,
workflow_id: &'life1 str,
delay_until: DateTime<Utc>,
) -> Pin<Box<dyn Future<Output = JournioResult<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn set_workflow_delay<'life0, 'life1, 'async_trait>(
&'life0 self,
workflow_id: &'life1 str,
delay_until: DateTime<Utc>,
) -> Pin<Box<dyn Future<Output = JournioResult<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Set or update the delay on a DELAYED workflow — ported from
setWorkflowDelay (system_database.go). No-op for workflows not in
the DELAYED status.Source§fn delete_workflows<'life0, 'life1, 'async_trait>(
&'life0 self,
workflow_ids: &'life1 [String],
delete_children: bool,
) -> Pin<Box<dyn Future<Output = JournioResult<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn delete_workflows<'life0, 'life1, 'async_trait>(
&'life0 self,
workflow_ids: &'life1 [String],
delete_children: bool,
) -> Pin<Box<dyn Future<Output = JournioResult<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Permanently delete the given workflows and all their associated data
(operation outputs, events, event history, streams) — ported from
deleteWorkflows (system_database.go). When delete_children is
true, descendant workflows are deleted recursively first.Source§fn list_workflows_filtered<'life0, 'life1, 'async_trait>(
&'life0 self,
filter: &'life1 ListWorkflowsFilter,
) -> Pin<Box<dyn Future<Output = JournioResult<Vec<WorkflowStatus>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn list_workflows_filtered<'life0, 'life1, 'async_trait>(
&'life0 self,
filter: &'life1 ListWorkflowsFilter,
) -> Pin<Box<dyn Future<Output = JournioResult<Vec<WorkflowStatus>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
List workflows with rich filtering and paging — ported from the
listWorkflowsOptions branch of listWorkflows
(system_database.go:1184). Backends translate the filter into their
native parameterization (Postgres ANY($n) arrays vs. SQLite
QueryBuilder separated lists).Source§fn wait_for_notification<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
_workflow_id: &'life1 str,
_topic: &'life2 str,
timeout: Duration,
) -> Pin<Box<dyn Future<Output = Result<(), JournioError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Self: 'async_trait,
fn wait_for_notification<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
_workflow_id: &'life1 str,
_topic: &'life2 str,
timeout: Duration,
) -> Pin<Box<dyn Future<Output = Result<(), JournioError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Self: 'async_trait,
Optional LISTEN/NOTIFY-backed wait hint for
recv. Backends without a
wakeup path can ignore it; the caller will re-poll after the timeout.Source§fn wait_for_event<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
_workflow_id: &'life1 str,
_key: &'life2 str,
timeout: Duration,
) -> Pin<Box<dyn Future<Output = Result<(), JournioError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Self: 'async_trait,
fn wait_for_event<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
_workflow_id: &'life1 str,
_key: &'life2 str,
timeout: Duration,
) -> Pin<Box<dyn Future<Output = Result<(), JournioError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Self: 'async_trait,
Optional LISTEN/NOTIFY-backed wait hint for
get_event.Source§fn wait_for_stream<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
_workflow_id: &'life1 str,
_key: &'life2 str,
timeout: Duration,
) -> Pin<Box<dyn Future<Output = Result<(), JournioError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Self: 'async_trait,
fn wait_for_stream<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
_workflow_id: &'life1 str,
_key: &'life2 str,
timeout: Duration,
) -> Pin<Box<dyn Future<Output = Result<(), JournioError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Self: 'async_trait,
Optional LISTEN/NOTIFY-backed wait hint for
read_stream.Auto Trait Implementations§
impl !RefUnwindSafe for SqliteSystemDatabase
impl !UnwindSafe for SqliteSystemDatabase
impl Freeze for SqliteSystemDatabase
impl Send for SqliteSystemDatabase
impl Sync for SqliteSystemDatabase
impl Unpin for SqliteSystemDatabase
impl UnsafeUnpin for SqliteSystemDatabase
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> 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