pub trait ProfileSqlLogic {
// Provided methods
fn get_next_profile_version<'life0, 'life1, 'async_trait>(
pool: &'life0 Pool<Postgres>,
args: &'life1 ProfileArgs,
version_request: VersionRequest,
) -> Pin<Box<dyn Future<Output = Result<Version, SqlError>> + Send + 'async_trait>>
where 'life0: 'async_trait,
'life1: 'async_trait { ... }
fn insert_drift_profile<'life0, 'life1, 'life2, 'life3, 'life4, 'life5, 'async_trait>(
pool: &'life0 Pool<Postgres>,
drift_profile: &'life1 DriftProfile,
base_args: &'life2 ProfileArgs,
version: &'life3 Version,
active: &'life4 bool,
deactivate_others: &'life5 bool,
) -> Pin<Box<dyn Future<Output = Result<String, SqlError>> + Send + 'async_trait>>
where 'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
'life4: 'async_trait,
'life5: 'async_trait { ... }
fn update_drift_profile<'life0, 'life1, 'life2, 'async_trait>(
pool: &'life0 Pool<Postgres>,
drift_profile: &'life1 DriftProfile,
entity_id: &'life2 i32,
) -> Pin<Box<dyn Future<Output = Result<PgQueryResult, SqlError>> + Send + 'async_trait>>
where 'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait { ... }
fn get_drift_profile<'life0, 'life1, 'async_trait>(
pool: &'life0 Pool<Postgres>,
entity_id: &'life1 i32,
) -> Pin<Box<dyn Future<Output = Result<Option<Value>, SqlError>> + Send + 'async_trait>>
where 'life0: 'async_trait,
'life1: 'async_trait { ... }
fn get_drift_profile_task<'life0, 'async_trait>(
pool: &'life0 Pool<Postgres>,
) -> Pin<Box<dyn Future<Output = Result<Option<TaskRequest>, SqlError>> + Send + 'async_trait>>
where 'life0: 'async_trait { ... }
fn list_drift_profiles<'life0, 'life1, 'async_trait>(
pool: &'life0 Pool<Postgres>,
args: &'life1 ListProfilesRequest,
) -> Pin<Box<dyn Future<Output = Result<Vec<ListedProfile>, SqlError>> + Send + 'async_trait>>
where 'life0: 'async_trait,
'life1: 'async_trait { ... }
fn update_drift_profile_run_dates<'life0, 'life1, 'life2, 'life3, 'async_trait>(
pool: &'life0 Pool<Postgres>,
entity_id: &'life1 i32,
schedule: &'life2 str,
previous_run: &'life3 DateTime<Utc>,
) -> Pin<Box<dyn Future<Output = Result<(), SqlError>> + Send + 'async_trait>>
where 'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait { ... }
fn update_drift_profile_status<'life0, 'life1, 'async_trait>(
pool: &'life0 Pool<Postgres>,
params: &'life1 ProfileStatusRequest,
) -> Pin<Box<dyn Future<Output = Result<(), SqlError>> + Send + 'async_trait>>
where 'life0: 'async_trait,
'life1: 'async_trait { ... }
}Provided Methods§
Sourcefn get_next_profile_version<'life0, 'life1, 'async_trait>(
pool: &'life0 Pool<Postgres>,
args: &'life1 ProfileArgs,
version_request: VersionRequest,
) -> Pin<Box<dyn Future<Output = Result<Version, SqlError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
fn get_next_profile_version<'life0, 'life1, 'async_trait>(
pool: &'life0 Pool<Postgres>,
args: &'life1 ProfileArgs,
version_request: VersionRequest,
) -> Pin<Box<dyn Future<Output = Result<Version, SqlError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
Get profile versions Determines the next version based on existing versions in the database
§Arguments
args- The profile arguments containing space, name, and versionversion_type- The type of version bump (major, minor, patch)pre_tag- Optional pre-release tagbuild_tag- Optional build metadata
§Returns
Result<Version, SqlError>- Result of the query returning
Sourcefn insert_drift_profile<'life0, 'life1, 'life2, 'life3, 'life4, 'life5, 'async_trait>(
pool: &'life0 Pool<Postgres>,
drift_profile: &'life1 DriftProfile,
base_args: &'life2 ProfileArgs,
version: &'life3 Version,
active: &'life4 bool,
deactivate_others: &'life5 bool,
) -> Pin<Box<dyn Future<Output = Result<String, SqlError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
'life4: 'async_trait,
'life5: 'async_trait,
fn insert_drift_profile<'life0, 'life1, 'life2, 'life3, 'life4, 'life5, 'async_trait>(
pool: &'life0 Pool<Postgres>,
drift_profile: &'life1 DriftProfile,
base_args: &'life2 ProfileArgs,
version: &'life3 Version,
active: &'life4 bool,
deactivate_others: &'life5 bool,
) -> Pin<Box<dyn Future<Output = Result<String, SqlError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
'life4: 'async_trait,
'life5: 'async_trait,
Sourcefn update_drift_profile<'life0, 'life1, 'life2, 'async_trait>(
pool: &'life0 Pool<Postgres>,
drift_profile: &'life1 DriftProfile,
entity_id: &'life2 i32,
) -> Pin<Box<dyn Future<Output = Result<PgQueryResult, SqlError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn update_drift_profile<'life0, 'life1, 'life2, 'async_trait>(
pool: &'life0 Pool<Postgres>,
drift_profile: &'life1 DriftProfile,
entity_id: &'life2 i32,
) -> Pin<Box<dyn Future<Output = Result<PgQueryResult, SqlError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Sourcefn get_drift_profile<'life0, 'life1, 'async_trait>(
pool: &'life0 Pool<Postgres>,
entity_id: &'life1 i32,
) -> Pin<Box<dyn Future<Output = Result<Option<Value>, SqlError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
fn get_drift_profile<'life0, 'life1, 'async_trait>(
pool: &'life0 Pool<Postgres>,
entity_id: &'life1 i32,
) -> Pin<Box<dyn Future<Output = Result<Option<Value>, SqlError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
fn get_drift_profile_task<'life0, 'async_trait>(
pool: &'life0 Pool<Postgres>,
) -> Pin<Box<dyn Future<Output = Result<Option<TaskRequest>, SqlError>> + Send + 'async_trait>>where
'life0: 'async_trait,
fn list_drift_profiles<'life0, 'life1, 'async_trait>(
pool: &'life0 Pool<Postgres>,
args: &'life1 ListProfilesRequest,
) -> Pin<Box<dyn Future<Output = Result<Vec<ListedProfile>, SqlError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
Sourcefn update_drift_profile_run_dates<'life0, 'life1, 'life2, 'life3, 'async_trait>(
pool: &'life0 Pool<Postgres>,
entity_id: &'life1 i32,
schedule: &'life2 str,
previous_run: &'life3 DateTime<Utc>,
) -> Pin<Box<dyn Future<Output = Result<(), SqlError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
fn update_drift_profile_run_dates<'life0, 'life1, 'life2, 'life3, 'async_trait>(
pool: &'life0 Pool<Postgres>,
entity_id: &'life1 i32,
schedule: &'life2 str,
previous_run: &'life3 DateTime<Utc>,
) -> Pin<Box<dyn Future<Output = Result<(), SqlError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
Update the drift profile run dates in the database Next run is calculated based on the provided schedule and previous run date
§Arguments
transaction- The database transactionservice_info- The service info to update the run dates forschedule- The schedule to update the run dates withprevious_run- The previous run datetime
§Returns
Result<(), SqlError>- Result of the query
fn update_drift_profile_status<'life0, 'life1, 'async_trait>(
pool: &'life0 Pool<Postgres>,
params: &'life1 ProfileStatusRequest,
) -> Pin<Box<dyn Future<Output = Result<(), SqlError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: '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.