pub trait SpcSqlLogic {
// Provided methods
fn insert_spc_drift_record<'life0, 'life1, 'async_trait>(
pool: &'life0 Pool<Postgres>,
record: &'life1 SpcServerRecord,
) -> Pin<Box<dyn Future<Output = Result<PgQueryResult, SqlError>> + Send + 'async_trait>>
where 'life0: 'async_trait,
'life1: 'async_trait { ... }
fn get_spc_features<'life0, 'life1, 'async_trait>(
pool: &'life0 Pool<Postgres>,
service_info: &'life1 ServiceInfo,
) -> Pin<Box<dyn Future<Output = Result<Vec<String>, SqlError>> + Send + 'async_trait>>
where 'life0: 'async_trait,
'life1: 'async_trait { ... }
fn get_spc_drift_records<'life0, 'life1, 'life2, 'life3, 'async_trait>(
pool: &'life0 Pool<Postgres>,
service_info: &'life1 ServiceInfo,
limit_datetime: &'life2 DateTime<Utc>,
features_to_monitor: &'life3 [String],
) -> Pin<Box<dyn Future<Output = Result<SpcDriftFeatures, SqlError>> + Send + 'async_trait>>
where Self: Send + 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait { ... }
fn get_records<'life0, 'life1, 'async_trait>(
pool: &'life0 Pool<Postgres>,
params: &'life1 DriftRequest,
minutes: i32,
) -> Pin<Box<dyn Future<Output = Result<SpcDriftFeatures, SqlError>> + Send + 'async_trait>>
where 'life0: 'async_trait,
'life1: 'async_trait { ... }
fn merge_feature_results(
results: SpcDriftFeatures,
map: &mut SpcDriftFeatures,
) -> Result<(), SqlError> { ... }
fn get_archived_records<'life0, 'life1, 'async_trait>(
params: &'life0 DriftRequest,
begin: DateTime<Utc>,
end: DateTime<Utc>,
minutes: i32,
storage_settings: &'life1 ObjectStorageSettings,
) -> Pin<Box<dyn Future<Output = Result<SpcDriftFeatures, SqlError>> + Send + 'async_trait>>
where 'life0: 'async_trait,
'life1: 'async_trait { ... }
fn get_binned_spc_drift_records<'life0, 'life1, 'life2, 'life3, 'async_trait>(
pool: &'life0 Pool<Postgres>,
params: &'life1 DriftRequest,
retention_period: &'life2 i32,
storage_settings: &'life3 ObjectStorageSettings,
) -> Pin<Box<dyn Future<Output = Result<SpcDriftFeatures, SqlError>> + Send + 'async_trait>>
where Self: Send + 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait { ... }
}
Provided Methods§
Sourcefn insert_spc_drift_record<'life0, 'life1, 'async_trait>(
pool: &'life0 Pool<Postgres>,
record: &'life1 SpcServerRecord,
) -> Pin<Box<dyn Future<Output = Result<PgQueryResult, SqlError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
fn insert_spc_drift_record<'life0, 'life1, 'async_trait>(
pool: &'life0 Pool<Postgres>,
record: &'life1 SpcServerRecord,
) -> Pin<Box<dyn Future<Output = Result<PgQueryResult, SqlError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
Inserts a drift record into the database
§Arguments
record
- A drift record to insert into the databasetable_name
- The name of the table to insert the record into
fn get_spc_features<'life0, 'life1, 'async_trait>(
pool: &'life0 Pool<Postgres>,
service_info: &'life1 ServiceInfo,
) -> Pin<Box<dyn Future<Output = Result<Vec<String>, SqlError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
Sourcefn get_spc_drift_records<'life0, 'life1, 'life2, 'life3, 'async_trait>(
pool: &'life0 Pool<Postgres>,
service_info: &'life1 ServiceInfo,
limit_datetime: &'life2 DateTime<Utc>,
features_to_monitor: &'life3 [String],
) -> Pin<Box<dyn Future<Output = Result<SpcDriftFeatures, SqlError>> + Send + 'async_trait>>where
Self: Send + 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
fn get_spc_drift_records<'life0, 'life1, 'life2, 'life3, 'async_trait>(
pool: &'life0 Pool<Postgres>,
service_info: &'life1 ServiceInfo,
limit_datetime: &'life2 DateTime<Utc>,
features_to_monitor: &'life3 [String],
) -> Pin<Box<dyn Future<Output = Result<SpcDriftFeatures, SqlError>> + Send + 'async_trait>>where
Self: Send + 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
Get SPC drift records
§Arguments
service_info
- The service to get drift records forlimit_datetime
- The limit datetime to get drift records forfeatures_to_monitor
- The features to monitor
Sourcefn get_records<'life0, 'life1, 'async_trait>(
pool: &'life0 Pool<Postgres>,
params: &'life1 DriftRequest,
minutes: i32,
) -> Pin<Box<dyn Future<Output = Result<SpcDriftFeatures, SqlError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
fn get_records<'life0, 'life1, 'async_trait>(
pool: &'life0 Pool<Postgres>,
params: &'life1 DriftRequest,
minutes: i32,
) -> Pin<Box<dyn Future<Output = Result<SpcDriftFeatures, SqlError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
Sourcefn merge_feature_results(
results: SpcDriftFeatures,
map: &mut SpcDriftFeatures,
) -> Result<(), SqlError>
fn merge_feature_results( results: SpcDriftFeatures, map: &mut SpcDriftFeatures, ) -> Result<(), SqlError>
Helper for merging current and archived binned spc drift records.
Sourcefn get_archived_records<'life0, 'life1, 'async_trait>(
params: &'life0 DriftRequest,
begin: DateTime<Utc>,
end: DateTime<Utc>,
minutes: i32,
storage_settings: &'life1 ObjectStorageSettings,
) -> Pin<Box<dyn Future<Output = Result<SpcDriftFeatures, SqlError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
fn get_archived_records<'life0, 'life1, 'async_trait>(
params: &'life0 DriftRequest,
begin: DateTime<Utc>,
end: DateTime<Utc>,
minutes: i32,
storage_settings: &'life1 ObjectStorageSettings,
) -> Pin<Box<dyn Future<Output = Result<SpcDriftFeatures, SqlError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
DataFusion implementation for getting spc drift records from archived data.
§Arguments
params
- The drift request parametersbegin
- The start time of the time windowend
- The end time of the time windowminutes
- The number of minutes to bin the datastorage_settings
- The object storage settings
§Returns
- A vector of drift records
fn get_binned_spc_drift_records<'life0, 'life1, 'life2, 'life3, 'async_trait>(
pool: &'life0 Pool<Postgres>,
params: &'life1 DriftRequest,
retention_period: &'life2 i32,
storage_settings: &'life3 ObjectStorageSettings,
) -> Pin<Box<dyn Future<Output = Result<SpcDriftFeatures, SqlError>> + Send + 'async_trait>>where
Self: Send + 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.