pub trait IngestDb: Send + Sync {
// Required methods
fn get_dataset_by_name<'life0, 'life1, 'async_trait>(
&'life0 self,
name: &'life1 str,
owner_id: Uuid,
tenant_id: Option<Uuid>,
) -> Pin<Box<dyn Future<Output = Result<Option<Dataset>, DatabaseError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn get_dataset<'life0, 'async_trait>(
&'life0 self,
id: Uuid,
) -> Pin<Box<dyn Future<Output = Result<Option<Dataset>, DatabaseError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn create_dataset<'life0, 'async_trait>(
&'life0 self,
dataset: Dataset,
) -> Pin<Box<dyn Future<Output = Result<Dataset, DatabaseError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn list_datasets_by_owner<'life0, 'async_trait>(
&'life0 self,
owner_id: Uuid,
) -> Pin<Box<dyn Future<Output = Result<Vec<Dataset>, DatabaseError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn get_data<'life0, 'async_trait>(
&'life0 self,
id: Uuid,
) -> Pin<Box<dyn Future<Output = Result<Option<Data>, DatabaseError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn create_data<'life0, 'async_trait>(
&'life0 self,
d: Data,
) -> Pin<Box<dyn Future<Output = Result<Data, DatabaseError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn attach_data_to_dataset<'life0, 'async_trait>(
&'life0 self,
dataset_id: Uuid,
data_id: Uuid,
) -> Pin<Box<dyn Future<Output = Result<(), DatabaseError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn update_last_accessed<'life0, 'life1, 'async_trait>(
&'life0 self,
data_ids: &'life1 [Uuid],
timestamp: DateTime<Utc>,
) -> Pin<Box<dyn Future<Output = Result<(), DatabaseError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn get_latest_pipeline_status<'life0, 'life1, 'async_trait>(
&'life0 self,
pipeline_name: &'life1 str,
dataset_id: Uuid,
) -> Pin<Box<dyn Future<Output = Result<Option<PipelineRunStatus>, DatabaseError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
}Required Methods§
fn get_dataset_by_name<'life0, 'life1, 'async_trait>(
&'life0 self,
name: &'life1 str,
owner_id: Uuid,
tenant_id: Option<Uuid>,
) -> Pin<Box<dyn Future<Output = Result<Option<Dataset>, DatabaseError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Sourcefn get_dataset<'life0, 'async_trait>(
&'life0 self,
id: Uuid,
) -> Pin<Box<dyn Future<Output = Result<Option<Dataset>, DatabaseError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn get_dataset<'life0, 'async_trait>(
&'life0 self,
id: Uuid,
) -> Pin<Box<dyn Future<Output = Result<Option<Dataset>, DatabaseError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Look up a dataset by its UUID.
fn create_dataset<'life0, 'async_trait>(
&'life0 self,
dataset: Dataset,
) -> Pin<Box<dyn Future<Output = Result<Dataset, DatabaseError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Sourcefn list_datasets_by_owner<'life0, 'async_trait>(
&'life0 self,
owner_id: Uuid,
) -> Pin<Box<dyn Future<Output = Result<Vec<Dataset>, DatabaseError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn list_datasets_by_owner<'life0, 'async_trait>(
&'life0 self,
owner_id: Uuid,
) -> Pin<Box<dyn Future<Output = Result<Vec<Dataset>, DatabaseError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
List all datasets owned by the given user.
fn get_data<'life0, 'async_trait>(
&'life0 self,
id: Uuid,
) -> Pin<Box<dyn Future<Output = Result<Option<Data>, DatabaseError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn create_data<'life0, 'async_trait>(
&'life0 self,
d: Data,
) -> Pin<Box<dyn Future<Output = Result<Data, DatabaseError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn attach_data_to_dataset<'life0, 'async_trait>(
&'life0 self,
dataset_id: Uuid,
data_id: Uuid,
) -> Pin<Box<dyn Future<Output = Result<(), DatabaseError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Sourcefn update_last_accessed<'life0, 'life1, 'async_trait>(
&'life0 self,
data_ids: &'life1 [Uuid],
timestamp: DateTime<Utc>,
) -> Pin<Box<dyn Future<Output = Result<(), DatabaseError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn update_last_accessed<'life0, 'life1, 'async_trait>(
&'life0 self,
data_ids: &'life1 [Uuid],
timestamp: DateTime<Utc>,
) -> Pin<Box<dyn Future<Output = Result<(), DatabaseError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Update the last_accessed timestamp on the given Data records.
Implementations should perform a bulk UPDATE data SET last_accessed = ? WHERE id IN (...) query. An empty data_ids slice is a no-op.
Sourcefn get_latest_pipeline_status<'life0, 'life1, 'async_trait>(
&'life0 self,
pipeline_name: &'life1 str,
dataset_id: Uuid,
) -> Pin<Box<dyn Future<Output = Result<Option<PipelineRunStatus>, DatabaseError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn get_latest_pipeline_status<'life0, 'life1, 'async_trait>(
&'life0 self,
pipeline_name: &'life1 str,
dataset_id: Uuid,
) -> Pin<Box<dyn Future<Output = Result<Option<PipelineRunStatus>, DatabaseError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Get the latest pipeline run status for a (pipeline_name, dataset_id) pair.
Returns None if no matching run exists.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".